Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 3 down vote accepted

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
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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