zabbix问题小结
1、zabbix be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
这个故障出现在 MySQL 8.0 上,用户使用 mysql client 5.7 链接 MySQL 8.0 提示如上
进入mysql依次执行下面语句
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #修改加密规则
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; #更新一下用户的密码
FLUSH PRIVILEGES; #刷新权限
2、PHP时区配置
一些常用的时区标识符说明:
Asia/Shanghai – 上海
Asia/Chongqing – 重庆
Asia/Urumqi – 乌鲁木齐
Asia/Hong_Kong – 香港
Asia/Macao – 澳门
Asia/Taipei – 台北
Asia/Singapore – 新加坡
3、数据库相关
grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
在mysql8.0创建用户和授权和之前不太一样.其实也不能说不一样,而是说更严格,需要先创建用户和设置密码,然后才能授权。
#先创建一个用户
create user 'zabbix'@'localhost' identified by '123123';
#再进行授权
grant all privileges on zabbix.* to 'zabbix'@'localhost' with grant option;
如果按以前的方式来做,那就会报语法错误
grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by '123123';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL serve