# [FAQ] DM 同步 MySQL 数据 dump 阶段报错 The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled

## Key Words

DM, show_compatibility_56, GLOBAL_STATUS, "ErrCode": 32001, dump-unit

## Description

1. DM 基本流程图如下：
![dm_faq_DM 同步 MySQL 数据 dump 阶段报错 The'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled](/images/DM/dm-global-status-feature-disabled.jpg)

2. 启动 DM 会发现要求开启 compatibility_56 特性：

    ```shell
    "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": ""
        }
       ...
      ]
    ```

3. 但依据报错指引在 MySQL 侧开启 compatibility_56  ，并验证已开启，还是会出现上述报错；

    ```sql
    mysql> show global variables like 'show_com%';
    +-----------------------+-------+
    | Variable_name         | Value |
    +-----------------------+-------+
    | show_compatibility_56 | ON    |
    +-----------------------+-------+
    1 row in set (0.00 sec)
    ```

## Content

1. 该报错是由于 DM 内部封装的 Dumpling 模块，在 all 模式下 dump-unit 阶段，会发出语句 ```SELECT `VARIABLE_NAME`,`VARIABLE_VALUE` FROM `information_schema`.`GLOBAL_STATUS` LIMIT 1``` 查询是否开启了 compatibility_56 特性。
    即使上游开启了compatibility_56， Dumpling 会尝试其他方式来运行这个查询，详情见 issue : <https://github.com/pingcap/tidb/issues/39027> 。
2. MySQL 在高版本将表 GLOBAL_STATUS 从 information_schema 迁移到 performance_schema 中，相关描述参考 issue ： <https://github.com/pingcap/tidb/issues/9154> 。
3. 可行的绕过手段是使用 Dumpling 手动导出上游 MySQL 数据，使用 TiDB-Lightning 导入 TiDB 全量数据，并使用 DM 的 incremental 模式配合 Dumpling 的 position TSO 实现增量同步。

## Affected Versions

DM v4.0 ~ v6.3