zabbix-server服务启动失败提示'caching_sha2_password' cannot be loaded

作者: 来源:本站原创 点击数: 发布时间:2021年08月09日

问题描述:

安装完zabbix-server服务启动失败提示,查看/var/log/zabbix日志

22491:20190425:033831.771 [Z3001] connection to database 'zabbix' failed: [2059] Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory



解决办法:

更改了mysql用户名密码的plugin。随后成功显示web端。


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

+-----------+------------------+-----------------------+

| host      | user             | plugin                |

+-----------+------------------+-----------------------+

| localhost | mysql.infoschema | caching_sha2_password |

| localhost | mysql.session    | caching_sha2_password |

| localhost | mysql.sys        | caching_sha2_password |

| localhost | root             | caching_sha2_password |

| localhost | zabbix           | mysql_native_password |

+-----------+------------------+-----------------------+

然后执行如下即可

mysql> alter user 'zabbix'@'localhost' identified by 'password';

mysql> alter user 'zabbix'@'localhost' identified with mysql_native_password by 'password';


注意第一个代码是改密码,第二个代码是改plugin。


原文链接: