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

I have been doing some work with MySQL recently and needed to use InnoDB. I checked to see if it was installed and switched on using: mysqladmin variables | grep have_innodb. It said no so i went into /etc/mysql/my.cnf and commented out –skip-innodb

After i restarted and tried to log in I am getting the following issue:

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

share|improve this question

migrated from Aug 21 '12 at 8:47

This question came from our site for professional and enthusiast programmers.

When you say you tried to log in, how are you doing it? Command-line mysql or via another application? – BryanH Aug 20 '12 at 19:06
Is your client and server expecting the same socket? (socket option in the configuration files) – pkhamre Aug 21 '12 at 8:48
did you check the mysql logs for errors while starting? – Goez Aug 21 '12 at 8:48

The error that you are seeing is most likely caused by the mysqld service not running. You can test this with

service mysqld status
mysql start/running, process 13632

or more likely in your case

service mysqld status
mysql stop/waiting

There are many reasons why your mysql might not be running, you'll most likely find more information about why in the error log /var/log/mysql/error.log

share|improve this answer

Your Answer


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