欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

进入数据库出现sock问题解决

程序员文章站 2022-06-02 17:06:18
...
[[email protected] ~]# mysql -p"i2:eWfx4AaM0"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

在my.cnf添加client

[client]
port=3306
socket=/var/lib/mysql/mysql.sock