Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 339

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 392

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 394
解决使用zabbix监控mysql数据库时出现 .my.cnf is ignored 问题 - Joyber 的博客

版本:
zabbix-agent: 5.0.7
mysql: 10.4.12-MariaDB
报错信息
Warning: World-writable config file '/var/lib/zabbix/.my.cnf' is ignored

原因是 .my.cnf 权限过多,人人可改,mysql为了安全不会加载这样的配置文件,所以被忽略

将文件改为644权限即可

chmod 644 /var/lib/zabbix/.my.cnf

测试,能正常进入即可:

mysql --defaults-file=/var/lib/zabbix/.my.cnf

/var/lib/zabbix/.my.cnf 文件内容:

[client]
user=xxxxxxx
password=xxxxxx
host=localhost

标签: zabbix

添加新评论