在新的EC2实例在启动MySQL抛出"无法通过socket&QUOT连接;错误抛出、实例、错误、socket

由网友(迟暮、)分享简介:我有一个EC2实例,但是当我运行mysql,它给了我这个错误I have an ec2 instance, but when i run mysql, it gives me this errorERROR 2002 (HY000): Can't connect to local MySQL server thro...

我有一个EC2实例,但是当我运行mysql,它给了我这个错误

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?

推荐答案

嗯,也许服务器没有运行? :)

Well, maybe the server is not running? :)

在最低限度:

ps aux|grep [m]ysql

如果这个没有返回值,那么MySQL没有运行。

If this returns nothing, then MySQL is not running.

通过添加下面的配置文件解决: LOG_ERROR = /路径/到/日志文件

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

阅读全文

相关推荐

最新文章