MySQL crash. Unknown cause. Signal 11

It appears you have been victimized by an on-going bug.

For some unknown reason, the mysql.sock file tends to disappear without warning:

  • http://www.unix.com/unix-advanced-expert-users/7581-mysql-problem-missing-mysql-sock.html
  • http://forums.freebsd.org/showthread.php?t=6805
  • http://lists.mysql.com/mysql/223277
  • https://kb.hivelocity.net/what-to-do-if-mysql-sock-file-is-missing/

I have dealt with this situation many times, Here are my past posts addressing this:

  • Dec 14, 2012 : Percona-server time out on /etc/init.d/mysql start
  • May 08, 2012 : How to properly stop MySQL server on Mac OS X?
  • Feb 06, 2012 : MySQL Database and Table Loss

The way around this is to login to mysql using the TCP/IP protocol. As long as you have:

  • You have a MySQL user called [email protected]
  • You use the --protocol=tcp option with mysql client
  • You are not using skip-networking

You can login to mysql like this:

mysql -uroot -h127.0.0.1 --protocol=tcp -p

If you can do this, then shutting down mysql and starting it will fix it like this:

mysqladmin -uroot -h127.0.0.1 --protocol=tcp -p shutdown
service mysql start

That will bring back the file mysql.sock. This explains why rebooting the OS also solved it.

Going back to the question, you typed

sudo mysqld

MySQL was already running and you were attempting to start mysqld again, thus the weird message.