3

I tried restarting the Mysql server but its not working for me. I am sure the server is running and the permissions on the folder /var/lib/mysql/ are correct (777).

When i tried to open the file mysql.sock, its giving me an error saying the file may be corrupt.

Please help me to log on to the mysql server.

  • Question : Is mysqld still running but you cannot connect? – RolandoMySQLDBA Jan 20 '12 at 17:57
  • Please run service mysql status and post the output of that command – RolandoMySQLDBA Jan 20 '12 at 18:05
4

First: Make sure that the owner of /var/lib/mysql and its files and subdirectories is mysql user of mysql group

to do that run the following command:

chown mysql:mysql -R /var/lib/mysql/*

Second: change write permissions to rwxr-xr-x (755) for mysql directory, and all its files and subdirectories, by running the following command:

chmod 755 -R /var/lib/mysql/*

now start mysql service

service mysql start
  • Did everything you suggested, but could not find the mysql.sock file in the folder you specified – vinny Jan 20 '12 at 5:53
  • Please tell the location of socket file by seeing from my.cnf. – Abdul Manaf Jan 20 '12 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.