刚刚在Linux里面安装好mysql,就显示Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’

解决方法:

1.用 find / -name mysql.sock查找mysql.sock,看是否存在

解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误

2.修改my.cnf文件

解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误


  添加如下部分

解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误

3.进入mysql 

 解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误

 没有设置密码的直接enter进入

解决Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’错误

  

相关文章:

  • 2021-10-18
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
猜你喜欢
  • 2021-12-06
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-01-17
  • 2021-12-21
相关资源
相似解决方案