【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错
真的是一次吐血的经历,弄了两个多小时才弄好。
问题1:直接登陆root用户报错
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

解答
这个其实还有通融的方法,直接在后面添加
mysql -u root -h 127.0.0.1 -p
问题2:在上一步后还是报错
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded

解答
到这里真的是吐血了
- 一种方式参考:https://stackoverflow.com/questions/37879448/mysql-fails-on-mysql-error-1524-hy000-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';
【linux】Can't connect to local MySQL server through socket和Plugin 'auth_socket' is not loaded报错的更多相关文章
- linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
我是小白,大佬勿喷 *** linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through ...
- linux云服务器mysql ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
一早上过来发现网站打开报错,数据库连接不上.. 有人改密码? putty进去,mysql -uroot -p 输入密码后,报错 ERROR 2002 (HY000): Can't connect to ...
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’解决方法 + Linux启动/停止/重启Mysql数据库的方法
启动mysql 报错: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/m ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 背景: mys ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib
今天在linux里安装mysql,运行时遇到这样的错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket ' ...
- 如何安装mariadb服务器和解决 can't connect to local mysql server through socket...
故障现象, ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.s ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
登录服务器,使用root用户连接mysql时出现错误提示: $ bin/mysql -uroot -p Enter password: ERROR (HY000): Can't connect to ...
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
MySQL在linux安装之后,连接到服务,报了下面的错误: ERROR 2002 (HY000): Can't connect to local MySQL server through socke ...
- mysql Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
mysql Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ 今天在linux中安装了mys ...
随机推荐
- python(leetcode)-14最长公共前缀
编写一个函数来查找字符串数组中的最长公共前缀. 如果不存在公共前缀,返回空字符串 "". 示例 1: 输入: ["flower","flow" ...
- 一文让你彻底理解 Java NIO 核心组件
背景知识 同步.异步.阻塞.非阻塞 首先,这几个概念非常容易搞混淆,但NIO中又有涉及,所以总结一下. 同步:API调用返回时调用者就知道操作的结果如何了(实际读取/写入了多少字节). 异步:相对于同 ...
- 07 训练Tensorflow识别手写数字
打开Python Shell,输入以下代码: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input ...
- leetcode — search-for-a-range
import java.util.Arrays; /** * Source : https://oj.leetcode.com/problems/search-for-a-range/ * * Cre ...
- 编码(2)从字节理解Unicode(UTF8/UTF16)
https://www.cnblogs.com/zizifn/p/4716712.html 从字节理解Unicode(UTF8/UTF16) 如果你不知道或者不了解什么是Unicode/UTF8/UT ...
- golang使用chrome headless获取网页内容
如今动态渲染的页面越来越多,爬虫们或多或少都需要用到headless browser来渲染待爬取的页面. 而最近广泛使用的headless browser解决方案PhantomJS已经宣布不再继续维护 ...
- 安装Ubuntu的Mozilla Firefox的Adobe Flash Player时学习/lib、/usr/lib、/usr/local/lib的区别
想对比一下Ubuntu和windows下视频效果体验的区别.安装了Ubuntu新版14.04.在之前的学习工程中,从来没想过使用虚拟机里的火狐浏览器看视频浏览网页,所以还真没有安装Flash的Linu ...
- [转]Node.js框架对比:Express/Koa/Hapi
本文转自:https://www.cnblogs.com/souvenir/p/6039990.html 本文翻译自: https://www.airpair.com/node.js/posts/no ...
- 第一册:lesson3-4.
原文: A:My coat and my umbrella please?Here is my ticket. B:Thank you sir.Number five.Here is your umb ...
- Spring.net的一些感悟
模拟Oracle+spring.net+NHibernate+MVC 对DLL文件引用问题得注意,库文件最好放在固定目录,否则严重影响项目迁移的成功, 由此可见,“代码规范”的重要性(自己大部分时间耽 ...