DBAtlas · 数据库运维图谱

8.0 → 8.4 LTS 升级预检查(util.checkForServerUpgrade)

MySQL升级

命令

# State the target version explicitly; the Shell must be the same version as the target or newer
mysqlsh root@db1:3306 -- util check-for-server-upgrade --target-version=8.4.10 --output-format=TEXT
# JSON output for automation, including a my.cnf check
mysqlsh root@db1:3306 -- util check-for-server-upgrade --target-version=8.4.10 --output-format=JSON --config-path=/etc/my.cnf > /tmp/upgrade_check.json

作用

对照目标版本检查当前服务器:已移除的变量和权限、默认值改变的参数、遗留认证方式、无效的列定义、外键和分区问题。Error 级别的发现会阻止升级。

适用场景

每次大版本/LTS 升级前;修复发现的问题后重新运行。

注意

也要查看警告:在 8.4 中 innodb_io_capacity(10000)、innodb_log_buffer_size(64 MB)、innodb_adaptive_hash_index(OFF)、innodb_change_buffering(none)、innodb_buffer_pool_instances 和 group_replication_consistency 等默认值发生变化,可能影响性能;在 my.cnf 中固定你想保持当前行为的值。SET_USER_ID 等已移除的权限会在升级时被删除。先升级一个副本,在负载下观察,然后再切换;不支持从 8.4 二进制降级到 8.0,因此回退手段是逻辑备份或保留在旧版本上的副本。

在 DBAtlas 中打开 →