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

一开始我用easyswoole测试连接数据库的,报连接失败,然后我自己在ssh那尝试用命令行先连接看看,就报了下面这个错

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

想起上次也是这个报错,啥问题呢,lsof -i:3306看没有?!启动呗service mysql start就OK了

posted @ 2019-05-14 15:29  蜗牛使劲冲  阅读(4)  评论(0编辑  收藏  举报  来源