Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: zabbix的数据库采用tidb后启动服务报错
[TiDB Usage Environment] Production Environment / Testing / Poc
Kylin V10
Zabbix 5.0
[TiDB Version]
7.5.0
[Reproduction Path] What operations were performed that caused the issue
After normally creating the database user and importing the Zabbix database, an error occurs when starting Zabbix.
[Encountered Problem: Problem Phenomenon and Impact]
After starting the Zabbix server, the web shows that it is not started.

This is what the log shows.

I have tried various methods but have not resolved it.
[Attachment: Screenshot/Log/Monitoring]
You should configure a TCP connection instead of a socket.
The configuration is incorrect, don’t use the local connection method, TiDB is not MySQL.
How should I configure it?
Why are you still using MySQL’s configuration?
So how do I modify it? TiDB and Zabbix are on the same server.
Send over the /etc/zabbix/zabbix_server.conf file for a look.
So how can I modify it to use it normally?
Can you use the MySQL client to log in via TCP on the Zabbix server? Try switching to TCP login.
How do I use TCP to log in? Should I modify the configuration file to SocketDir=/tmp?
I modified it, but it doesn’t seem to work.
The socket should be this DBSocket. Can you check if specifying the location of tidb.sock works?
Is it a local connection?
It seems that this file does not exist.
Uh, try changing “localhost” to “127.0.0.1” in the connection configuration and see if it works.
The configuration file uses 127.0.0.1.
The configuration file uses 127.0.0.1
zabbix_server.conf has a DBHost=localhost
You need to restart zabbix.