关于“Zabbix服务器端运行中 否“错误

在Zabbix管理界面遇到Zabbix服务器端运行中否的错误,日志显示数据库连接失败。修改配置文件/etc/zabbix/zabbix_server.conf,将DBHost从localhost改为127.0.0.1,然后重启服务,问题得到解决。

在Zabbix管理界面中显示"Zabbix服务器端运行中    否"错误。

查看ZABBIX日志文件连接数据库错误

7674:20230718:214944.295 using configuration file: /etc/zabbix/zabbix_server.conf
  7674:20230718:214944.297 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

将”/etc/zabbix/zabbix_server.conf"中的“DBHost=localhost”改成“DBHost=127.0.0.1”后重启服务“systemctl restart zabbix-server”,问题解决

### Option: DBHost
#	Database host name.
#	If set to localhost, socket is used for MySQL.
#	If set to empty string, socket is used for PostgreSQL.
#	If set to empty string, the Net Service Name connection method is used to connect to Oracle database; also see
#	the TNS_ADMIN environment variable to specify the directory where the tnsnames.ora file is located.
#
# Mandatory: no
# Default:
# DBHost=localhost
DBHost=127.0.0.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值