0%

Can't connect to local MySQL server through socket'/var/run/mysqld/mysqld.sock' (2)

启动命令mysql时报错:

ERROR2002 (HY000): Can’t connect to local MySQL server through socket’/var/run/mysqld/mysqld.sock’ (2)

解决方法:

找到配置文件/etc/mysql/conf.d/mysql.cnf添加

[mysql]

protocol=tcp

参考文献:https://www.cnblogs.com/zhao123h/p/5207622.html

------------- 本文结束 感谢您的阅读-------------