
# 参数对比列表
在进行数据库迁移时，为了确保迁移成功后业务应用的使用不受影响，数据复制服务提供了参数对比功能帮助您进行源库和目标库参数一致性对比。
本章节针对不同的引擎版本，列举了常见的常规参数及性能参数，方便您在使用参数对比功能时进行参考。
#### MySQL 5.6版本
表1MySQL5.6参数列表 
| **参数名称**                        | **参数类型** | **是否需要重启** **数据库** |
|:---|:---|:---|
| connect_timeout                 | 常规参数     | 否                  |
| event_scheduler                 | 常规参数     | 否                  |
| innodb_lock_wait_timeout        | 常规参数     | 否                  |
| max_connections                 | 常规参数     | 否                  |
| net_read_timeout                | 常规参数     | 否                  |
| net_write_timeout               | 常规参数     | 否                  |
| explicit_defaults_for_timestamp | 常规参数     | 是                  |
| innodb_flush_log_at_trx_commit  | 常规参数     | 否                  |
| max_allowed_packet              | 常规参数     | 否                  |
| tx_isolation                    | 常规参数     | 否                  |
| character_set_client            | 常规参数     | 否                  |
| character_set_connection        | 常规参数     | 否                  |
| collation_connection            | 常规参数     | 否                  |
| character_set_results           | 常规参数     | 否                  |
| collation_server                | 常规参数     | 否                  |
| binlog_stmt_cache_size          | 性能参数     | 否                  |
| bulk_insert_buffer_size         | 性能参数     | 否                  |
| innodb_buffer_pool_size         | 性能参数     | 是                  |
| innodb_buffer_pool_instances    | 性能参数     | 是                  |
| key_buffer_size                 | 性能参数     | 否                  |
| long_query_time                 | 性能参数     | 否                  |
| query_cache_type                | 性能参数     | 是                  |
| read_buffer_size                | 性能参数     | 否                  |
| read_rnd_buffer_size            | 性能参数     | 否                  |
| sort_buffer_size                | 性能参数     | 否                  |
| sync_binlog                     | 性能参数     | 否                  |
   
#### MySQL 5.7版本
表2MySQL5.7参数列表 
| **参数名称**                        | **参数类型** | **是否需要重启** **数据库** |
|:---|:---|:---|
| connect_timeout                 | 常规参数     | 否                  |
| event_scheduler                 | 常规参数     | 否                  |
| innodb_lock_wait_timeout        | 常规参数     | 否                  |
| max_connections                 | 常规参数     | 否                  |
| net_read_timeout                | 常规参数     | 否                  |
| net_write_timeout               | 常规参数     | 否                  |
| explicit_defaults_for_timestamp | 常规参数     | 否                  |
| innodb_flush_log_at_trx_commit  | 常规参数     | 否                  |
| max_allowed_packet              | 常规参数     | 否                  |
| tx_isolation                    | 常规参数     | 否                  |
| character_set_client            | 常规参数     | 否                  |
| character_set_connection        | 常规参数     | 否                  |
| collation_connection            | 常规参数     | 否                  |
| character_set_results           | 常规参数     | 否                  |
| binlog_cache_size               | 性能参数     | 否                  |
| binlog_stmt_cache_size          | 性能参数     | 否                  |
| bulk_insert_buffer_size         | 性能参数     | 否                  |
| innodb_buffer_pool_size         | 性能参数     | 否                  |
| innodb_buffer_pool_instances    | 性能参数     | 是                  |
| key_buffer_size                 | 性能参数     | 否                  |
| long_query_time                 | 性能参数     | 否                  |
| query_cache_type                | 性能参数     | 否                  |
| read_buffer_size                | 性能参数     | 否                  |
| read_rnd_buffer_size            | 性能参数     | 否                  |
| sort_buffer_size                | 性能参数     | 否                  |
| sync_binlog                     | 性能参数     | 否                  |
   
#### MySQL 8.0版本
表3MySQL8.0参数列表 
| **参数名称**                        | **参数类型** | **是否需要重启数据库** |
|:---|:---|:---|
| connect_timeout                 | 常规参数     | 否             |
| event_scheduler                 | 常规参数     | 否             |
| innodb_lock_wait_timeout        | 常规参数     | 否             |
| max_connections                 | 常规参数     | 否             |
| net_read_timeout                | 常规参数     | 否             |
| net_write_timeout               | 常规参数     | 否             |
| explicit_defaults_for_timestamp | 常规参数     | 否             |
| innodb_flush_log_at_trx_commit  | 常规参数     | 否             |
| max_allowed_packet              | 常规参数     | 否             |
| tx_isolation                    | 常规参数     | 否             |
| character_set_client            | 常规参数     | 否             |
| character_set_connection        | 常规参数     | 否             |
| collation_connection            | 常规参数     | 否             |
| character_set_results           | 常规参数     | 否             |
| binlog_cache_size               | 性能参数     | 否             |
| binlog_stmt_cache_size          | 性能参数     | 否             |
| bulk_insert_buffer_size         | 性能参数     | 否             |
| innodb_buffer_pool_size         | 性能参数     | 否             |
| innodb_buffer_pool_instances    | 性能参数     | 是             |
| key_buffer_size                 | 性能参数     | 否             |
| long_query_time                 | 性能参数     | 否             |
| query_cache_type                | 性能参数     | 否             |
| read_buffer_size                | 性能参数     | 否             |
| read_rnd_buffer_size            | 性能参数     | 否             |
| sort_buffer_size                | 性能参数     | 否             |
| sync_binlog                     | 性能参数     | 否             |
   
![](https://support.huaweicloud.com/realtimemig-drs/public_sys-resources/note_3.0-zh-cn.png)
- 目前仅MySQL数据库迁移支持参数对比的功能。
- 对于上述参数"innodb_buffer_pool_size"，参数对比功能对应用到目标数据库的值做了内控，最大不会超过目标数据库总内存的70%。所以有时候是无法完全和源数据库该参数取值一致，这是为了避免目标数据库设置过大，而导致数据库无法启动，如果您觉得上述最大值偏小，可以在数据库中通过执行命令手动设置更大的值。
 
