views:

26

answers:

1

I have an ec2 instance, but when i run mysql, it gives me this error

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

Similarly, when i run

/etc/init.d/mysql start

Oct 31 11:29:16 domU-12-31-38-00-A8-62 /etc/init.d/mysql[5263]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

What is wrong?

+1  A: 

Well, maybe the server is not running? :)

At the bare minimum:

ps aux|grep [m]ysql

If this returns nothing, then MySQL is not running.

Troubleshoot by adding the following to the config file: log_error=/path/to/logfile

Till