首页 > 数据库> > linux进入mysql数据库报ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.s
linux进入mysql数据库报ERROR 2002 (HY000): Can‘t connect to local MySQL server through socket ‘/tmp/mysql.s
作者:互联网
报错 :ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
解决方法:指定mysql.sock文件
有的可能要指定一下地址 加上 -h ip即可,
我这里可能是因为配置文件里指定的地址是0.0.0.0
[mysqluser@VM-8-3-centos mysql]$ ./bin/mysql -S ./mysql.sock -u root -p
标签:tmp,mysql,sock,HY000,through,connect,linux 来源: https://blog.csdn.net/weixin_52837796/article/details/120548638