Bug #2679 /tmp/mysql.sock doesn't exist after mysqld_safe started
Submitted: 9 Feb 2004 2:17 Modified: 9 Feb 2004 2:46
Reporter: Scott Porter Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.17 max (binary) OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[9 Feb 2004 2:17] Scott Porter
After installation of 4.0.17 max, following instructions in INSTALL file server starts but mysqladmin cannot be used as socket does not exist in /tmp. However, the socket is created in /var/lib/mysql! Bit surprised that nobody has found this before it was released really...

How to repeat:
Install 4.0.17 max.
Start mysqld_safe
enjoy the hilarity as mysqladmin falls over ;-)

Suggested fix:
I just add a symlink from /tmp/mysql.sock to /var/lib/mysql/mysql.sock in the startup script to get around this bug. Probably not an ideal fix though...
[9 Feb 2004 2:46] Guilhem Bichot
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.
[19 Feb 2006 15:21] Paul Lohr
I am using version 5.0.18, this is still a problem. Even though mysql.sock is installed at /var/lib/mysql, mySQL looks for the file at /tmp.
[18 Jul 2012 11:37] Senthil kumar mj
Check the error log file for appropriate information, it may help. 
I got the same error. Checked the error log which shown the mistake in my.cnt which helped.