Mysql – Unable to connect to MySQL

MySQLphpmyadmin

Whenever I try to connect to MySQL to access phpmyadmin, it returns an error:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)

I also tried to start MySQL through my server's terminal:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

When I restarted MySQL it displayed:

Stopping MySQL database server mysqld
df: `/var/lib/mysql/.': No such file or directory
df: no file systems processed
/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!

How might I resolve this?

Best Answer

I've seen that a couple of times. It has meant that the actual MySQL server instance was down for some reason. It was fixed by a simple call to:

service mysql restart

Edit

I just noticed your comment The partition with /var/lib/mysql is too full!. This means your drive is too full to run MySQL. You need to either talk to your server administrator or just clean up the HD, but this will keep breaking until more room is available.