Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a database that I installed ~6 months ago and had been running fine. This is currently running in Ubuntu 12.04. Attempting to connect to MySQL causes this error:

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

Then theres:

$ sudo mysqld

which returns:

130702 15:38:54 [Note] Plugin 'FEDERATED' is disabled.
130702 15:38:54 InnoDB: The InnoDB memory heap is disabled
130702 15:38:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130702 15:38:54 InnoDB: Compressed tables use zlib
130702 15:38:54 InnoDB: Initializing buffer pool, size = 128.0M
130702 15:38:54 InnoDB: Completed initialization of buffer pool
130702 15:38:54 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130702 15:38:54  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
130702 15:38:55  InnoDB: Waiting for the background threads to start
130702 15:38:56 InnoDB: 1.1.8 started; log sequence number 5201901917
130702 15:38:56 [Note] Server hostname (bind-address): ''; port: 3306
130702 15:38:56 [Note]   - '' resolves to '';
130702 15:38:56 [Note] Server socket created on IP: ''.
130702 15:38:56 [Note] Event Scheduler: Loaded 0 events
130702 15:38:56 [Note] mysqld: ready for connections.
Version: '5.5.28-0ubuntu0.12.04.3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)
19:39:02 UTC - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 346681 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f9509e51530
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f94f1d3de60 thread_stack 0x30000

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f94e0004b80): is an invalid pointer
Connection ID (thread ID): 1

The manual page at contains
information that should help you find out what is causing the crash.

I'm at a loss. What other reports would be useful in diagnosing this? /var/log/mysql.err & /var/log/mysql.log are empty.

share|improve this question
It would appear restarting the OS solved the issue. – kevinaskevin Jul 2 '13 at 20:34
up vote 2 down vote accepted

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

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

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

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 root@
  • 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.

share|improve this answer
I restarted the server it was running on the problem seemed to have resolved itself. Should I be concerned that it will come up again? – kevinaskevin Jul 2 '13 at 23:21
Because of that bug, I always login as root@ You should always do so. So, when it happens, just restart mysql using mysqladmin. – RolandoMySQLDBA Jul 3 '13 at 0:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.