MySQL无法连接ERROR 2002 (HY000): Can't connect to local MySQL server through socket

【MySQL无法连接ERROR 2002 (HY000): Can't connect to local MySQL server through socket】报错信息
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
分析: 数据库没启动
解决方法:
c6
server mysqld start
c7
systemctl start mysqld

    推荐阅读