mysql pe admin_mysql 8.0 登录报错

新安装mysql 8.0,在用户登录时提示这样的错误

Failed to connect to MySQL server: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/xtrabackup/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory.

在网上搜了下,发现主要是因为mysql 8.0的默认认证方式有了调整,需要做如下调整。

修改默认认证方式

# vi /etc/my.cnf

[mysqld]

default_authentication_plugin = mysql_native_password

修改已有用户的认证方式

mysql> select user,host,authentication_string,plugin,account_locked from mysql.user;

mysql> alter user 'root'@'192.168.56.%' identified with mysql_native_password by 'MyNewPass@123' PASSWORD EXPIRE NEVER;

Query OK, 0 rows affected (0.39 sec)

caching_sha2_password、mysql_native_password

下面的问题源自mysql 官方文档

Important

In MySQL 8.0, caching_sha2_password is the default authentication plugin rather than mysql_native_password. For information about the implications of this change for server operation and compatibility of the server with clients and connectors, see caching_sha2_password as the Preferred Authentication Plugin.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值