Mysql problem: no mysql.sock

一个人想着一个人 提交于 2019-12-01 08:45:53

You can locate the actual socket file and create a symbolic link leading to it as follows:

# check path to socket from mysql settings  
mysqladmin | grep d.sock

# create a symbolic link
ln -s path_to_mysql_socket /opt/lampp/var/mysql/mysql.sock

Although the test you did is a bit garbled, Im going to assume that the test just prove mysql isnt running.

Depending on how the mysql configured itself there should be a startup file somewhere, usually around the /etc/rc.* directories, and you would need to run the rc.mysql start (or it could be a S<nn>MySQL in an rc3.d directory for example

I didn't find a certain reason for my problem. I just unisntalled and reinstalled, and then everything went Ok.
That is not a real solution, but it worked. Good luck

I came in the same situation when I made a grant to *.* to other user. Mysql tried to give permissions over the mysql database and that provoked the disaster: instantly, the mysql.sock file disappeared.

this happened with the version 5.6

Jimmy_lee

I had the same problem with you, and I found some useful information:

2015-08-14 10:51:17 30934 [ERROR] InnoDB: Unable to lock /opt/lampp/var/mysql/ibdata1, error: 11
2015-08-14 10:51:17 30934 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

So, I rebooted the computer and restarted XAMPP, and the problem was resolved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!