hmalekib

Member
Nov 8, 2004
23
0
151
Hi guys... My mysql.sock is missing and im getting the following error:

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

I tried /scripts/restartsrv_mysql but no luck..

any suggestions?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
hmalekib said:
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
Please search these forums. This issue has been discussed hundreds of times.
 

kerriritter

Active Member
Oct 25, 2004
31
0
156
Try this

Try this procedure to fix mysql.sock error:

cd /var/lib/mysql
touch mysql.sock
chown mysql:mysql mysql.sock
chmod 1777 mysql.sock

now make a sym link into /tmp

ln -s /var/lib/mysql/mysql.sock /tmp
then
chmod 1777 /tmp

now
/scripts/mysqlup --force


now just restart mysql
/etc/rc.d/init.d/mysql restart
 

noimad1

Well-Known Member
Mar 27, 2003
626
0
166
kerriritter said:
Try this procedure to fix mysql.sock error:

cd /var/lib/mysql
touch mysql.sock
chown mysql:mysql mysql.sock
chmod 1777 mysql.sock

now make a sym link into /tmp

ln -s /var/lib/mysql/mysql.sock /tmp
then
chmod 1777 /tmp

now
/scripts/mysqlup --force


now just restart mysql
/etc/rc.d/init.d/mysql restart

What if I tried all this and it still doesnt work, any other ideas?
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
noimad1 said:
What if I tried all this and it still doesnt work, any other ideas?
If none of these suggestions worked, you can seek professional help.
 

noimad1

Well-Known Member
Mar 27, 2003
626
0
166
AndyReed said:
If none of these suggestions worked, you can seek professional help.

I took a break, then a nap, ate some food, took another nap, then came back to it and was able to get it fixed.