ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

In this article, we will see the solution for below error.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ERROR 2002 HY000 Cant connect to local MySQL server through socket varrunmysqldysqld.sock 2

Reasons:

1. MySQL is not started.
2. MySQL not installed on your machine.

Solution:

1. Lets verify the status of mysql server whether it is started or not.
Continue reading ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)