mysql8.0工具登录问题

版权声明:见贤思齐焉 https://blog.csdn.net/weixin_28906733/article/details/85989634

在mysql8.0当中对登录密码的认证进行了增强,由原来的mysql_native_password改为caching_sha2_password,而当前的数据库工具并不支持这项功能会导致无法登录,提示错误如下:
Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found

在工具未支持之前有两种方式可处理登录问题:

1、更改当前登录用户密码类型:
mysql> ALTER USER 'yourusername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
2、修改数据库配置文件的默认认证类型(在my.cnf文件下修改):
[mysqld]
default_authentication_plugin=mysql_native_password

猜你喜欢

转载自blog.csdn.net/weixin_28906733/article/details/85989634