0

Getting the below error while connecting MySQL

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

The /var/run/mysqld folder is showing as empty. How can I create mysqld.sock file inside the mysqld folder and what are the configurations I need to include it.

PS: I already perform uninstall and reinstall operations several times. But it also don't workout.

I referred the below links for solve this issue. But it doesn't work.

How to solve this problem?

James Z
  • 12,209
  • 10
  • 24
  • 44
  • Usually mysql error logs which is under /var/log/mysqld/error.log will show you the cause. this issue usually points to mysql-server not running even a single time. – Suchandra T May 21 '23 at 06:50

0 Answers0