/usr/bin/mysqladmin: connect to server at 'localhost' failed error:....

woody200456

Member
Aug 6, 2005
9
0
151
For some reason i get this error trying to restart mysql:

/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

how do i fix thanks in advanced.
 
H

helpline

Guest
Hello,

What is the mysql version that you are using?

killall -9 mysqld
killall -9 mysqld

chown mysql.mysql /var/lib/mysql

/scripts/restartsrv mysql


check mysql log for additional errors, if any and post them. Also try to reset your MySQL root password and the restart mysql service.

Post your /etc/my.cnf file, if problem persist.
 

NogomHost

Registered
Dec 24, 2006
3
0
151
To me this same problem. Please explained in the commentary, more than that


What is the mysql version that you are using?

I used Release mysql (4.1.21-standard)
 

mitul

Well-Known Member
Feb 8, 2003
291
0
166
/scripts/restartsrv_mysql should fix the issue. Check mysqld.log for more information.
 

almoo7

Member
Mar 13, 2006
5
0
151
I'm having the same problem, I get this error:

/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").

My mySQL version is 4.1.21

This is from the mysqld.log

061229 11:00:57 mysqld ended

061229 11:00:58 mysqld started
061229 11:00:58 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Ple$

061229 11:00:58 [ERROR] Aborting

061229 11:00:58 [Note] /usr/sbin/mysqld: Shutdown complete

061229 11:00:58 mysqld ended

061229 11:10:03 mysqld started
061229 11:10:03 [ERROR] Fatal error: Can't change to run as user 'mysql' ; Ple$

061229 11:10:03 [ERROR] Aborting

061229 11:10:03 [Note] /usr/sbin/mysqld: Shutdown complete

061229 11:10:03 mysqld ended

061229 14:08:33 [ERROR] Aborting

061229 14:08:33 [Note] /usr/sbin/mysqld: Shutdown complete

061229 14:08:33 mysqld ended

Anyone know how to fix this? Please help, thanks.