Can't restart mysql

Solution 1:

Check the MySQL logs in /var/log or possibly in /var/lib/mysql.

My bet is that the reason it "hangs" is because its doing a repair of some sort on tables that could have gotten corrupted. I've seen "mysql" take 20 minutes or longer to "start"... How long have you given it before assuming it's "hung"?

See if the logs indicate anything. Also, after starting mysql once, try running this to verify MySQL is, in fact, running:

ps aux | grep mysql

Solution 2:

The best way to debug this type of thing is to directly run

sudo mysqld

That's the only way to see startup errors. (For some reason, they aren't written to any of the mysql logs). Often you can see it's failing to load a binlog or having problems getting to a certain directory.