ja nu nokarās mysql.sock
Okay, so let’s answer to this question, once for all.
First of all, you DO NOT WANT to recreate mysql.sock,
that logically makes NO sense at all.
What you REALLY want to do is restart the mysql daemon (mysqld),
which when it is up and running will create a socket for you,
so you can communicate with it.
– Creating a file by hand won’t help
– Creating a socket by hand won’t help
– None of these “can talk” to the server which is “not running”.
The reason why you “lost mysql.sock” is that:
– the mysqld daemon stop or crashed
– a fatal error occurred
– your configuration is wrong /etc/my.cnf
– your permissions are wrong /var/lib/mysql and /var/lib/mysql/mysql …
=> make sure the owner is mysql:mysql and 775 or similar.
– your mysql data is corrupted: myisamcheck or mysql_install_db
Now, you may say, hey but I tried:
– /etc/init.d/mysqld restart
– /etc/init.d/mysqld start
– mysqld_safe –user=mysql &
and none of those worked…
That’s sort of normal, if the server crashed in the first place.
So, what you REALLY need to do is look at the file located in:
tail -f /var/log/mysqld.log
figure out the error message, solve that error message
or try to find a work-around for that error on google.
Once that error message is “solved”, then you can safely restart mysqld
[no need to reboot], and once the daemon is up and running,
your magical “mysql.sock” file will appear as it did before. =)
The big problem with this is that the “mysql.sock” error message
is not helping at all, and you must “know” that the real error message
is in the mysql log file that’s all.
Hope this help.
Original post in : http://www.linuxforums.org/forum/servers/1451-what-mysql-sock-file-2.html