Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 主TIDB从mysql启动时,报错The slave IO thread stops because the master has an unknown @@GLOBAL.GTID_MODE ‘0’.
[Test Environment for TiDB]
[TiDB Version]
[Reproduction Path] Master-slave replication, master TiDB, slave MySQL, IO error
[Encountered Problem: Phenomenon and Impact]
When starting SLAVE, the slave IO thread stops because the master has an unknown @@GLOBAL.GTID_MODE ‘0’. Both master and slave are set to SET @@GLOBAL.GTID_MODE = 0; however, MySQL shows off, TiDB shows 0, and then this error occurs.
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
How did you set up the master-slave configuration? Generally, TiDB synchronizes to MySQL using TiCDC, but this error doesn’t seem related to that.
Haven’t studied TiCDC, directly using MySQL’s master-slave replication.
How to start TiDB from MySQL.
Use the TiCDC tool to synchronize TiDB to MySQL.
TiDB and MySQL cannot perform MySQL-like master-slave replication; you need to use TiCDC or TiDB Binlog for synchronization.
TiDB’s binlog is different from MySQL’s and does not support MySQL’s master-slave replication. It is recommended to look into CDC’s master-slave replication.
You can skip this setting and restart the master-slave.
Execute the following command to check the configuration of GTID_MODE:
SHOW GLOBAL VARIABLES LIKE ‘GTID_MODE’;
TiDB is only compatible with MySQL SQL syntax and cannot directly use MySQL master-slave mode to connect to TiDB. You can use TiCDC to synchronize from TiDB to MySQL and use DM to synchronize from MySQL to TiDB.
When I first came into contact with TiDB, I also thought it was 100% compatible with MySQL.
For version 7.5, use CDC. For older versions, you can consider binlog.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.