文档简介:
参数对比表
在进行数据库迁移时,为了确保迁移成功后业务应用的使用不受影响,数据库复制服务提供了参数对比功能帮助您进行源库和目标库参数一致性对比。
本章节针对不同的引擎版本,列举了常见的常规参数及性能参数,方便您在使用参数对比功能时进行参考。
MySQL 5.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_cache_size |
性能参数 |
4,096~18,446,744,073,709,547,520 |
否 |
binlog_stmt_cache_size |
性能参数 |
4,096~18,446,744,073,709,547,520 |
否 |
bulk_insert_buffer_size |
性能参数 |
0~18,446,744,073,709,551,615 |
否 |
innodb_buffer_pool_size |
性能参数 |
5,242,880~18,446,744,073,709,551,615 |
是 |
key_buffer_size |
性能参数 |
8~9,223,372,036,854,771,712 |
否 |
long_query_time |
性能参数 |
0~3,600 |
否 |
query_cache_type |
性能参数 |
OFF, ON, DEMAND |
是 |
read_buffer_size |
性能参数 |
8,192~2,147,479,552 |
否 |
read_rnd_buffer_size |
性能参数 |
1~2,147,483,647 |
否 |
sort_buffer_size |
性能参数 |
32,768~18,446,744,073,709,551,615 |
否 |
sync_binlog |
性能参数 |
0~4,294,967,295 |
否 |
MySQL 5.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 |
常规参数 |
- |
否 |
collation_server |
常规参数 |
- |
否 |
binlog_cache_size |
性能参数 |
4,096~18,446,744,073,709,547,520 |
否 |
binlog_stmt_cache_size |
性能参数 |
4,096~18,446,744,073,709,547,520 |
否 |
bulk_insert_buffer_size |
性能参数 |
0~18,446,744,073,709,551,615 |
否 |
innodb_buffer_pool_size |
性能参数 |
536,870,912~18,446,744,073,709,551,615 |
否 |
key_buffer_size |
性能参数 |
8~9,223,372,036,854,771,712 |
否 |
long_query_time |
性能参数 |
0~3,600 |
否 |
query_cache_type |
性能参数 |
OFF, ON, DEMAND |
否 |
read_buffer_size |
性能参数 |
8,192~2,147,479,552 |
否 |
read_rnd_buffer_size |
性能参数 |
1~2,147,483,647 |
否 |
sort_buffer_size |
性能参数 |
32,768~18,446,744,073,709,551,615 |
否 |
sync_binlog |
性能参数 |
0~4,294,967,295 |
否 |
说明:
-
目前仅MySQL数据库迁移支持参数对比的功能。
-
对于上述参数“innodb_buffer_pool_size”,参数对比功能对应用到目标数据库的值做了内控,最大不会超过目标数据库总内存的70%。所以有时候是无法完全和源数据库该参数取值一致,这是为了避免目标数据库设置过大,而导致数据库无法启动,如果您觉得上述最大值偏小,可以在数据库中通过执行命令手动设置更大的值。