Can’t Connect to Local MySQL Server Through Socket ‘/var/mysql/mysql.sock’.

This error causes the database to go down since the MYSQL service is unable to connect. This is usually because the service is misconfigured. This is corrected by adding this line (or modifying it): bind-addres =localhost

– Making sure permissions are correct:

chmod -R 755 /var/lib/mysql/

– Usually, it will fail to restart

/etc/init.d/mysql restart
MariaDB server PID file could not be found! [FAILED]
Starting MariaDB [FAILED]

– Backup

cd /etc/my.cnf
cp -a my.cnf my.cnf.lwbk

– Adding localhost

vim my.cnf
diff my.cnf my.cnf.lwbk

< bind-addres =localhost

If you receive Error mysql ‘table’ doesn’t exist in engine, go here.


That’s all folks, see you  later!

Leave a Reply

Your email address will not be published. Required fields are marked *