Strange mysql.sock error during backup

SeLLeRoNe

Super Moderator
Joined
Oct 9, 2004
Messages
6,643
Location
A Coruña, Spain
Hello everyone,

i never had this problem before and all DB are working fine (can see db from mysql db into directadmin and with phpmyadmin).

The problem is on administration backup, ive started a user backup from that section and message system after some minutes return this error:

Code:
Error while backing up database user1_db
mysqldump error output: mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect

Ive checked /etc/my.cnf and /usr/local/directadmin/conf/mysql.conf and both got socket path line with correct path (/tmp/mysql.sock)

Anyone know if there is another part or file where i should set the socket path? Maybe in some admin backups conf?

Thanks everyone
 
i know i can do that way but that is just a workaround, i would like to know if there is a conf to change for the sock file on backups aswell
 
I don't have listed any socket thingy in /etc/my.cnf (so its using default)
Could you stop MySQL, remove the socket line, start MySQL again and try again to create backup.

Mine is '/var/lib/mysql/mysql.sock'
In the dir '/var/run/mysqld/' I have only the 'mysqld.pid'.
 
Ive found the problem.

There was another my.cnf in /etc/mysql/my.cnf with specific socket poiting to
/var/run/mysqld/mysqld.sock

Ive removed the directory /etc/mysql and restarted mysqld, now everything working good.

For who is interested this problem is related just on manual adinistrator backup, on administrator backup in crontab that error never appeared.
 
Back
Top