Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com 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

1 Answer 1

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

 
discard

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