问题描述:登录mysql时报错ERROR 1524,如下所示:
数据库:mysql 5.7.21
1、异常重现
[root@leo-mysql5721 ~]# mysql -uroot -p
Enter password:
ERROR 1524 (HY000): Plugin 'auth_socket' is not loaded
2、解决方案
mysql> select user,plugin from user;
+---------------+-----------------------+
| user | plugin |
+---------------+-----------------------+
| root | auth_socket |
| mysql.session | mysql_native_password |
| mysql.sys | mysql_native_password |
| erika | mysql_native_password |
| jeffrey | mysql_native_password |
+---------------+-----------------------+
5 rows in set (0.00 sec)
mysql> update user set plugin='mysql_native_password' where user='root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> select user,plugin from user;
+---------------+-----------------------+
| user | plugin |
+---------------+-----------------------+
| root | mysql_native_password |
| mysql.session | mysql_native_password |
| mysql.sys | mysql_native_password |
| erika | mysql_native_password |
| jeffrey | mysql_native_password |
+---------------+-----------------------+
5 rows in set (0.00 sec)
[root@leo-mysql5721 ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.21 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
说明:如上所示,修改plugin后成功登录数据库.
登录mysql时报错ERROR 1524
原创Liujun_Deng 博主文章分类:Mysql ©著作权
文章标签 MySQL ERROR 1524 文章分类 MySQL 数据库
-
mysql在删索引时报错ERROR 1075
mysql在删索引时报错ERROR 1075
mysql ERROR 1075 -
mysql在新建用户时报错ERROR 1819
mysql在新建用户时报错ERROR 1819
MySQL ERROR 1819 -
mysql在给表新增主键时报错ERROR 1063
mysql在给表新增主键时报错ERROR 1063
mysql 主键 ERROR 1063 新增主键 -
连接mysql数据库时报错ERROR 1130
连接mysql数据库时报错ERROR 1130
MySQL ERROR 1130 连接异常 -
mysql运用load方式导入数据时报错ERROR 1290
mysql运用load方式导入数据时报错ERROR 1290
mysql 导入数据 ERROR 1290 -
yum安装软件时报错: Transaction check error
在yum安装kubelet时发现报错:
transactioncheckerro