Error Starting Service After Adopting TiDB for Zabbix Database

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: zabbix的数据库采用tidb后启动服务报错

| username: TiDBer_kMTvTIEv

[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.
image
This is what the log shows.
image
I have tried various methods but have not resolved it.
[Attachment: Screenshot/Log/Monitoring]

| username: 江湖故人 | Original post link

You should configure a TCP connection instead of a socket.

| username: zhanggame1 | Original post link

The configuration is incorrect, don’t use the local connection method, TiDB is not MySQL.

| username: TiDBer_kMTvTIEv | Original post link

How should I configure it?

| username: wangccsy | Original post link

Why are you still using MySQL’s configuration?

| username: TiDBer_kMTvTIEv | Original post link

So how do I modify it? TiDB and Zabbix are on the same server.

| username: 江湖故人 | Original post link

Send over the /etc/zabbix/zabbix_server.conf file for a look.

| username: TiDBer_kMTvTIEv | Original post link

So how can I modify it to use it normally?

| username: TiDBer_kMTvTIEv | Original post link

zabbix_server.conf (21.8 KB)

| username: TiDBer_kMTvTIEv | Original post link

zabbix.conf.php (1.4 KB)

| username: 江湖故人 | Original post link

Can you use the MySQL client to log in via TCP on the Zabbix server? Try switching to TCP login.

| username: TiDBer_kMTvTIEv | Original post link

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.

| username: 江湖故人 | Original post link

The socket should be this DBSocket. Can you check if specifying the location of tidb.sock works?

| username: 哈喽沃德 | Original post link

Is it a local connection?

| username: TiDBer_kMTvTIEv | Original post link

Yes, local connection.

| username: TiDBer_kMTvTIEv | Original post link

It seems that this file does not exist.

| username: 江湖故人 | Original post link

Uh, try changing “localhost” to “127.0.0.1” in the connection configuration and see if it works.

| username: TiDBer_kMTvTIEv | Original post link

The configuration file uses 127.0.0.1.

| username: 江湖故人 | Original post link

The configuration file uses 127.0.0.1

zabbix_server.conf has a DBHost=localhost
You need to restart zabbix.

| username: TiDBer_kMTvTIEv | Original post link

The error has changed.