在新的EC2实例在启动MySQL抛出"无法通过socket&QUOT连接;错误 [英] Starting mysql in new EC2 instance throws "can't connect through socket" error
本文介绍了在新的EC2实例在启动MySQL抛出"无法通过socket&QUOT连接;错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个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
这篇关于在新的EC2实例在启动MySQL抛出"无法通过socket&QUOT连接;错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文