MySQL won't start?

user191647 asked:

when running sudo /etc/init.d/mysql restart, it shuts down ok but doesn’t start back up.
Running df -h i get the following:

Filesystem      Size  Used Avail Use% Mounted on
rootfs          3.6G  1.7G  1.8G  48% /
/dev/root       3.6G  1.7G  1.8G  48% /
devtmpfs        235M     0  235M   0% /dev
tmpfs            49M  220K   49M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            98M     0   98M   0% /run/shm
/dev/mmcblk0p1   56M   19M   38M  33% /boot

I also get this error when running mysql -u root -p

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

Any ideas? stuck on this for hours…

My answer:

MySQL is not starting.

To find out why, check MySQL’s own error logs, generally located at /var/log/mysql/error.log, and the general system log (which should be /var/log/syslog on a Debian based system).

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.