- Error connecting to MySQL: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111)
Try restarting server first.
check for mysql Error
mysql -u root
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (111)
Follow here
https://help.directadmin.com/item.php?id=332
To find all socket files on your system run:
sudo find / -type s
Add or edit mysql socket /etc/my.cnf. In my case, it is
socket=/var/lib/mysql/mysql.sock Where is mysql
whereis mysql.sock