Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

关于ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)的解决方法:

出错告诉我在于mysql.socket文件没有出现在/tmp目录下,它是随着mysql服务的启动自动生成的,所以问题原因在于没有启动mysql服务,所以只要启动mysql服务就行了:/etc/init.d/mysql start   或者   /etc/rc.d/init.d/mysqld start
 

你可能感兴趣的:(mysql,server,local,through)