Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/m

edbruin

New member
Joined
May 6, 2015
Messages
3
Hello,

Got a problem with DirectAdmin and Mysql. Changing the password of a FTP user results in "Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)", still the password is changed????

I'm also unable to create a new database

I us:

Distributor ID : Debian
Description: Debian GNU/Linux 7.8 (wheezy)
Release: 7.8
Codename: wheezy

PHP5 version: 5.5.23-1

MySQL version: 5.6.23

Please help!!!
 
Hello,

You won't change MySQL password while the mysql server is down.

If you want to troubleshoot the issue yourself please follow this guide: http://help.directadmin.com/item.php?id=332

Of course we could guide you here further as soon as you provide more details including those from error log of MySQL. Or free feel to send a PM for a quote if you want your issue be solved immediately by us.
 
mysql is running...

@zEitEr,

Connecting with putty to the server gives me the opportunity to logon to mysql so mysql is running...
 
Hello,

I checked if /var/lib/mysql/mysql.sock exists. It did not, so i made a symbolic link with "ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock" still no solution.

mysql errorlog:

150506 15:05:44 mysqld_safe mysqld from pid file /usr/local/mysql/data/xxxxxxxx.nl.pid ended
150506 15:06:03 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
2015-05-06 15:06:03 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for mo$
2015-05-06 15:06:03 2492 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2015-05-06 15:06:03 2492 [Warning] Buffered warning: Changed limits: table_cache: 431 (requested 2000)

2015-05-06 15:06:03 2492 [Note] Plugin 'FEDERATED' is disabled.
2015-05-06 15:06:03 2492 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-05-06 15:06:03 2492 [Note] InnoDB: The InnoDB memory heap is disabled
2015-05-06 15:06:03 2492 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-05-06 15:06:03 2492 [Note] InnoDB: Memory barrier is not used
2015-05-06 15:06:03 2492 [Note] InnoDB: Compressed tables use zlib 1.2.7
2015-05-06 15:06:03 2492 [Note] InnoDB: Using Linux native AIO
2015-05-06 15:06:03 2492 [Note] InnoDB: Using CPU crc32 instructions
2015-05-06 15:06:03 2492 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-05-06 15:06:03 2492 [Note] InnoDB: Completed initialization of buffer pool
2015-05-06 15:06:03 2492 [Note] InnoDB: Highest supported file format is Barracuda.
2015-05-06 15:06:04 2492 [Note] InnoDB: 128 rollback segment(s) are active.
2015-05-06 15:06:04 2492 [Note] InnoDB: Waiting for purge to start
2015-05-06 15:06:04 2492 [Note] InnoDB: 5.6.23 started; log sequence number 15089094
2015-05-06 15:06:04 2492 [Note] Server hostname (bind-address): '*'; port: 3306
2015-05-06 15:06:04 2492 [Note] IPv6 is available.
2015-05-06 15:06:04 2492 [Note] - '::' resolves to '::';
2015-05-06 15:06:04 2492 [Note] Server socket created on IP: '::'.
2015-05-06 15:06:04 2492 [Note] Event Scheduler: Loaded 0 events
2015-05-06 15:06:04 2492 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.23' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
 
1.Install locate:

apt-get install locate

2.Locate your mysql.sock by doing

>locate mysql.sock

3. copy the path to mysql.sock

4. edit mysql.conf
nano /usr/local/directadmin/conf/mysql.conf

add either the path that you found after socket=

or this line

socket=/usr/local/mysql/data/mysql.sock

5.save
 
Back
Top