DM Migration Task from MySQL 5.7.40 to TiDB 6.1 Reports Error 3167: The 'INFORMATION_SCHEMA.GLOBAL_STATUS' Feature is Disabled

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

Original topic: MySQL 5.7.40 至 TiDB 6.1 的 DM 迁移任务,报错 Error 3167: The ‘INFORMATION_SCHEMA.GLOBAL_STATUS’ feature is disabled

| username: OnTheRoad

【Environment】Test Environment
【Environment Description】

  1. Software Version

  2. Upstream Data Source and Migration Task Configuration

  • Upstream Data Source
[tidb@localhost ~]$ tiup dmctl --master-addr 192.168.3.228:8261 operate-source show

{
    "result": true,
    "msg": "",
    "sources": [
        {
            "result": true,
            "msg": "",
            "source": "mysql_3_228",
            "worker": "dm-192.168.3.228-8263"
        }
    ]
}
  • Migration Task Configuration
[tidb@localhost ~]$ more dm_test228.yaml 
# 1. Global Configuration 
name: dm_test228                                    # Specify the migration task name 
task-mode: all                                      # Specify the migration mode. "all" means "full migration + incremental synchronization" 
meta-schema: "dm_meta"                              # Specify the database for storing meta information downstream, default is dm_meta
case-sensitive: false                               # Case insensitive for object names 

# 2. Define the upstream MySQL data source and applied filter rules 
mysql-instances:
  - source-id: "mysql_3_228"                            # Specify the source-id of the upstream MySQL data source 
    block-allow-list: "ba-block-228"                    # Specify the bound database object block-allow-list rule 
    filter-rules: ["filter-rule-ignore"]                # Specify the bound binlog event filter rule 
    route-rules: ["route-rule-228"]                     # Specify the bound route rule   

# 3. Downstream TiDB Database Configuration 
target-database:
    host: "192.168.3.220"                           # Specify the IP of the downstream TiDB      
    port: 13390                                     # Specify the port of the downstream TiDB database  
    user: "dm_tidb"                                 # Specify the user of the downstream TiDB database  
    password: "1x7n9z9VKEFIj360AhYMOEBE5bjtMnQS"    # Specify the encrypted password of the downstream TiDB database using dmctl --encrypt  
    session:                                        # Specify the session variables when connecting to TiDB 
      tidb_skip_utf8_check: 1

# 4. Define the specific content of the upstream MySQL database block-allow-list, filters, and routes rules 
# 4.1 Define the specific content of the block-allow-list rule  
block-allow-list:                               
  ba-allow-228:                              # Database object filter rule name        
    do-dbs: ["tpcc"]                         # Databases to migrate, multiple names separated by commas    
    ignore-dbs: ["mysql", "account"]         # Databases to ignore, multiple names separated by commas  

  ba-block-228:                              # Database object filter rule name        
    ignore-tables:                           # Tables to ignore                   
    - db-name: "tpcc"
      tbl-name: "history"                    # Ignore the upstream tpcc.history table 

# 4.2 Define the specific content of the binlog event filter rule 
filters:                                            
  filter-rule-ignore:                               # Binlog event filter rule name 
    schema-pattern: "tpcc"                          # Database name matching rule, supports wildcards "*" and "?" 
    table-pattern:  "orders"                        # Table name matching rule, supports wildcards "*" and "?" 
    events: ["truncate table", "drop table"]        # Event types to match 
    action: Ignore                                  # Ignore the specified operations in events 

# 4.3 Define the specific content of the routes rule, i.e., which upstream database/table syncs to which downstream database/table. Commonly used for database/table merging synchronization 
routes:      
  route-rule-228:                             # Route rule name 
    schema-pattern: "tpcc"                    # Sync the upstream tpcc database to the downstream apcc database            
    target-schema: "apcc"

【Fault Phenomenon】

  1. Error Content
"errors": [
    {
      "ErrCode": 32001,
      "ErrClass": "dump-unit",
      "ErrScope": "internal",
      "ErrLevel": "high",
      "Message": "mydumper/dumpling runs with error, with output (may empty): ",
      "RawCause": "sql: SELECT `VARIABLE_NAME`,`VARIABLE_VALUE` FROM `information_schema`.`GLOBAL_STATUS` LIMIT 1, args: []: Error 3167: The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for 'show_compatibility_56'",
      "Workaround": ""
    }
   ...
  ]
  1. The upstream MySQL database has enabled show_compatibility_56
mysql> show global variables like 'show_com%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| show_compatibility_56 | ON    |
+-----------------------+-------+
1 row in set (0.00 sec)
  1. Performing a logical backup on the upstream MySQL using the dm_mysql user with dumpling works normally.
| username: Jiawei | Original post link

Is it still not working after modifying the parameter show_compatibility_56?

| username: OnTheRoad | Original post link

The upstream has already modified this parameter and it took effect after restarting.

| username: jansu-dev | Original post link

I want to ask if the DM version is also v6.1.0?

| username: OnTheRoad | Original post link

Yes, the DM and TiDB versions are consistent.

[tidb@localhost ~]$ tiup dm list
tiup is checking updates for component dm ...
Starting component `dm`: /home/tidb/.tiup/components/dm/v1.11.0/tiup-dm /home/tidb/.tiup/components/dm/v1.11.0/tiup-dm list
Name     User  Version  Path                                          PrivateKey
----     ----  -------  ----                                          ----------
dm-krui  tidb  v6.1.0   /home/tidb/.tiup/storage/dm/clusters/dm-krui  /home/tidb/.tiup/storage/dm/clusters/dm-krui/ssh/id_rsa
| username: jansu-dev | Original post link

  1. I don’t understand MySQL, but I see that DM executed the SQL SELECT VARIABLE_NAME,VARIABLE_VALUE FROM information_schema.GLOBAL_STATUS LIMIT 1. You can try executing it manually to see the result. If it’s 0 or off, that might be the issue. You could try manually changing the MySQL variable, which might bypass the problem, but I’m not sure if it’s safe.
  2. I couldn’t find which specific function in DM triggered this action :thinking:. It might be best to consult someone familiar with DM. I have raised an issue → Appear error of `...see the documentation for 'show_compatibility_56'"` when using DM · Issue #39027 · pingcap/tidb · GitHub
  3. It seems that MySQL 8.0 has already removed this feature → MySQL 8.0: Remove i_s.*variables, i_s.*status · Issue #9154 · pingcap/tidb · GitHub, but since you are using MySQL 5.7.40, it shouldn’t be a problem.
| username: db_user | Original post link

It seems that after version 5.7.16, the table GLOBAL_STATUS was moved to performance_schema. This query should be the key to the error. It feels like doing a full dump with dumpling and then incremental might be better.

| username: mayjiang0203 | Original post link

Appear error of `...see the documentation for 'show_compatibility_56'"` when using DM · Issue #39027 · pingcap/tidb · GitHub Product issue, it has been recorded in this issue. Please follow the progress of this issue.

| username: system | Original post link

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