Error when starting TiDB as a slave from MySQL: The slave IO thread stops because the master has an unknown @@GLOBAL.GTID_MODE '0'

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’.

| username: TiDBer_8mpI7QNz

[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]

| username: 像风一样的男子 | Original post link

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.

| username: TiDBer_8mpI7QNz | Original post link

Haven’t studied TiCDC, directly using MySQL’s master-slave replication.

| username: wangccsy | Original post link

How to start TiDB from MySQL.

| username: 小龙虾爱大龙虾 | Original post link

Use the TiCDC tool to synchronize TiDB to MySQL.

| username: 啦啦啦啦啦 | Original post link

TiDB and MySQL cannot perform MySQL-like master-slave replication; you need to use TiCDC or TiDB Binlog for synchronization.

| username: 像风一样的男子 | Original post link

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.

| username: dba远航 | Original post link

You can skip this setting and restart the master-slave.

| username: 哈喽沃德 | Original post link

Execute the following command to check the configuration of GTID_MODE:
SHOW GLOBAL VARIABLES LIKE ‘GTID_MODE’;

| username: 春风十里 | Original post link

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.

| username: 江湖故人 | Original post link

When I first came into contact with TiDB, I also thought it was 100% compatible with MySQL.

| username: zhanggame1 | Original post link

For version 7.5, use CDC. For older versions, you can consider binlog.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.