ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysq

mrhost

Verified User
Joined
Aug 3, 2017
Messages
15
Hello, I have tried to upgrade MYSQL 5.7 to MariaDB 10.3 but it all went down the hill since i cannot get MYSQL to work again.

After the process, it gave the follow errors

HTML:
/usr/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (40) when trying to connect

HTML:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (40)

NOTE:
There is no mysql.sock available in /tmp or /var/lib/mysql

I am stuck for two days now and have also checked every page on google but still no luck.
Any help is appreciated please.
 
Last edited:
Hello,

You might need to do a clean install of MySQL 5.7 and recover DBs from /usr/local/directadmin/custombuild/mysql_backups

but first check mysql error logs
 
Hello,

You might need to do a clean install of MySQL 5.7 and recover DBs from [FONT=&]/usr/local/directadmin/custombuild/mysql_backups

but first check mysql error logs [/FONT]

Thanks for your prompt response. I have followed the instructions here: https://help.directadmin.com/item.php?id=563
But always end up with the following error:
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

I am lost but still happy i got rid of cPanel ;)
 
You should really check mysql error logs. It is not possible to guess a root cause of the issue on your end another way.
 
Back
Top