# MySQL ERROR 2002: Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock

Solutions:-

```
systemctl status mysql
systemctl start mysql
systemctl list-units --type=service | grep mysql
nano /etc/mysql/mysql.conf.d/mysqld.cnf
```

note: ensure that the 'socket' directive in the configuration file points to the correct socket file it should look like:

```
socket = /var/run/mysqld/mysqld.sock
```

```
systemctl restart mysql
mysql -u root -p
mysql
sudo apt install make 
```
