What should I do , if I receive the following error while refreshing mysql on the server ?

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Refer the below steps to solve this:

a.Check the ownership of “/var/lib/mysql” and its files and subdirectories in  mysql user of mysql group.

To reset the ownership run the following command:

cd /var/lib/mysql
chown mysql.mysql -R /var/lib/mysql/*

b. Check the permissions of mysql directory, and all its files and subdirectories.

It must be set to rwxr-xr-x (755).

To reset the permission Run the following command:

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

C.Refresh mysql service now using the below command :-

service mysql start

The  error message should disappear and you should see the below output :-

Starting MySQL. [ OK ]

  • 0 Utilisateurs l'ont trouvée utile
Cette réponse était-elle pertinente?

Articles connexes

Can I use my domain name or must I use my IP address as the hostname for FTP?

Using your IP address (192.168.22.22  is an example IP address) is the preferred entry for...

Can you transfer my sites from my current host to my new VPS?

Yes. We will transfer all of your sites free* of charge and will assure that you experience no or...

Do you allow MP3 files? Do you allow streaming of videos?

Yes we do with our special plans at http://hostripples.in/avs-hosting.php

Do you support Cold Fusion?

We do not support or Cold Fusion on our shared hosting servers, however you are more than welcome...