![How to solve ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' How to solve ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'](https://1.bp.blogspot.com/-nIUTdCAcWCo/Uz_C9p-KEWI/AAAAAAAAAHE/XhSNxDemgqI/s600-w640-h480-e365-ci-rw-c/MySQL.jpg)
How to solve ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
![ubuntu - Problem:: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - Stack Overflow ubuntu - Problem:: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - Stack Overflow](https://i.stack.imgur.com/IKxCW.png)
ubuntu - Problem:: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) - Stack Overflow
![Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. sock' (2) - Stack Overflow Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. sock' (2) - Stack Overflow](https://i.stack.imgur.com/5KFc1.png)
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. sock' (2) - Stack Overflow
![ubuntu - MySql Manual instalation - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) - Stack Overflow ubuntu - MySql Manual instalation - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) - Stack Overflow](https://i.stack.imgur.com/q0M1z.png)
ubuntu - MySql Manual instalation - ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) - Stack Overflow
![mariadb报:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused") - 中级菜鸟- 博客园 mariadb报:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111 "Connection refused") - 中级菜鸟- 博客园](https://img2018.cnblogs.com/blog/433425/201905/433425-20190527172936047-522168672.png)