Authentication plugin 'caching_sha2_password' is not supported
复制
mysql> select host,user,plugin,authentication_string,password_expired,password_last_changed,password_lifetime,account_locked,Create_role_priv,Drop_role_priv,Password_reuse_history,Password_reuse_time,Password_require_current FROM MYSQL.user whereuser='root'\G;
*************************** 1. row ***************************
Host: localhost
User: root
plugin: caching_sha2_password
authentication_string: $A$005$3^3*[&!YiY\Ft]HlTE9I24QoS990EXKd3ANI.ePlavnWyt4fLyp7.Z1hh8
password_expired: N
password_last_changed: 2018-12-12 09:38:42
password_lifetime: NULL
account_locked: N
Create_role_priv: Y
Drop_role_priv: Y
Password_reuse_history: NULL
Password_reuse_time: NULL
Password_require_current: NULL
1 row in set (0.00 sec)
复制
mysql> alter user 'root'@'localhost' identified with mysql_native_password by 'iris';
Query OK, 0 rows affected (1.85 sec)
复制
mysql> select host,user,plugin,authentication_string,password_expired,password_last_changed,password_lifetime,account_locked,Create_role_priv,Drop_role_priv,Password_reuse_history,Password_reuse_time,Password_require_current FROM MYSQL.user whereuser='root'\G;
*************************** 1. row ***************************
Host: localhost
User: root
plugin: mysql_native_password
authentication_string: *72C26A280E81148FBC40D9D60BE74759464D93FA
password_expired: N
password_last_changed: 2018-12-12 09:27:04
password_lifetime: NULL
account_locked: N
Create_role_priv: Y
Drop_role_priv: Y
Password_reuse_history: NULL
Password_reuse_time: NULL
Password_require_current: NULL
1 row in set (0.00 sec)
复制
mysql>
mysql> SHOW VARIABLES LIKE 'default_authentication_plugin';
+-------------------------------+-----------------------+
| Variable_name | Value |
+-------------------------------+-----------------------+
| default_authentication_plugin | caching_sha2_password |
+-------------------------------+-----------------------+
1 row in set, 1 warning (0.00 sec)
mysql>
复制
[mysqld]
default_authentication_plugin=mysql_native_password
复制
mysql> alter user 'root'@'localhost' identified with caching_sha2_password by 'iris';
Query OK, 0 rows affected (0.18 sec)
mysql>
复制
[mysqld]
default_authentication_plugin=caching_sha2_password
复制
长按下图二维码,关注更多数据库实用技巧。

文章转载自小灯数据,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【专家有话说第五期】在不同年龄段,DBA应该怎样规划自己的职业发展?
墨天轮编辑部
1483次阅读
2025-03-13 11:40:53
MySQL8.0统计信息总结
闫建(Rock Yan)
550次阅读
2025-03-17 16:04:03
2月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
502次阅读
2025-03-13 14:38:19
SQL优化 - explain查看SQL执行计划(一)
金同学
441次阅读
2025-03-13 16:04:22
MySQL突然崩溃?教你用gdb解剖core文件,快速锁定“元凶”!
szrsu
428次阅读
2025-03-13 00:29:43
MySQL生产实战优化(利用Index skip scan优化性能提升257倍)
chengang
371次阅读
2025-03-17 10:36:40
MySQL数据库当前和历史事务分析
听见风的声音
346次阅读
2025-04-01 08:47:17
墨天轮个人数说知识点合集
JiekeXu
323次阅读
2025-04-01 15:56:03
MySQL 生产实践-Update 二级索引导致的性能问题排查
chengang
317次阅读
2025-03-28 16:28:31
MySQL8.0直方图功能简介
Rock Yan
260次阅读
2025-03-21 15:30:53