Installed with snap, Ubuntu 18.04
nextcloud was successfully running, but I can’t connect to MySQL server, please help me.
here is command
#mysql -h 127.0.0.1 -u nextcloud -pX*********HJF
and the result is
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
here is all content in config/config.php
, hasn’t modify anything
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/snap/nextcloud/current/htdocs/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
'url' => '/extra-apps',
'writable' => true,
),
),
'supportedDatabases' =>
array (
0 => 'mysql',
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/tmp/sockets/redis.sock',
'port' => 0,
),
'instanceid' => '[REMOVED]',
'passwordsalt' => '[REMOVED]',
'secret' => '[REMOVED]',
'trusted_domains' =>
array (
0 => '127.0.0.1',
1 => '[REMOVED]',
2 => '192.168.11.120',
),
'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
'dbtype' => 'mysql',
'version' => '15.0.7.0',
'overwrite.cli.url' => 'http://127.0.0.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '[REMOVED]',
'dbpassword' => '[REMOVED]',
'installed' => true,
'maintenance' => false,
'loglevel' => 2,
);