问题1:直接登陆root用户报错

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

【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错

解答

这个其实还有通融的方法,直接在后面添加

mysql -u root -h 127.0.0.1 -p

问题2:在上一步后还是报错

ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded

【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错

解答

到这里真的是吐血了

  1. 一种方式参考:https://stackoverflow.com/questions/37879448/mysql-fails-on-mysql-error-1524-hy000-plugin-auth-socket-is-not-loaded
  2. 上面这个方法在我这里没有效果,继续报这个错。【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错
    解决的方法,就是绕过登陆root用户,登陆另外一个拥有很大权限的用户,来修改第一个方法提到的change the auth plugin。方法参考:https://blog.csdn.net/qq_38737992/article/details/81090373 。登陆这个用户后,修改
    update user set plugin="mysql_native_password" where User='root';

相关文章:

  • 2021-12-21
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
猜你喜欢
  • 2021-12-12
  • 2021-08-08
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-05-19
相关资源
相似解决方案