"Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: 无法打开共享对象文件: 没有那个文件或目录 QMYSQL: Unable to connect"
在本机安装MySQL8.0,通过程序中连接数据库时,提示:Authentication plugin ‘caching_sha2_password’ cannot be loaded 的错误,经查看发现,mysql8.0改变了身份验证插件,可以看到变更了 5.7及其以前的方式: mysql_native_password。
解决:
开启mysql,输入:
ALTER USER user_name@localhost IDENTIFIED WITH mysql_native_password BY 'XXXXXX';
user_name及权限根据实际修改。