MySQL 8.0 to 8.4, part 2 – what the upgrade checker catches, and what it can't see

Published By , independent database consultant Lab

I built a MySQL 8.0 server with problems the 8.4 manual warns about, ran MySQL Shell's upgrade checker, then upgraded anyway. It caught the DOUBLE AUTO_INCREMENT column and both removed config lines, missed QUALIFY and TABLESAMPLE, and a removed variable in my.cnf stopped the server only after the data dictionary was already upgraded.

Lab write-up. A hands-on environment built and run by the author, not a customer engagement.

Environment described in the article: MySQL Community 8.0.46 and 8.4.13 (official Docker images, arm64), MySQL Shell 9.7.0 (from the mysql:9.7.0 image), Docker Desktop 29.9.3 on an Apple M4 Pro, limited to 8 CPUs and 15.6 GiB RAM, run on 21 November 2026.

Everyone runs MySQL Shell’s upgrade checker prior to upgrading to 8.4. I wanted to know what it misses so I built a MySQL 8.0 server with a few of the things the 8.4 manual says will break, ran the checker against it and then upgraded the data directory anyway.

This is part 2 of 6 on the journey from MySQL 8.0 to 8.4. Part 1 was all about what waiting costs on RDS and Aurora.

The lab

MySQL 8.0.46 and 8.4.13 from the official Docker images. On a Mac: Docker Desktop on an Apple M4 Pro (arm64), limited to 8 CPUs and 15.6 GiB of RAM. Both servers mount the same Docker volume as their data directory (one at a time) so I can do a real in-place upgrade. I start mysqld directly rather than via the image’s entrypoint script so the config file gets to the server exactly as it’s written. No replication, no load in this part as the question is compatibility rather than speed. It’s a laptop, not a production environment.

The 8.0 server starts with a config file that has two lines in it that were fine for years:

[mysqld]
expire_logs_days = 7
default_authentication_plugin = mysql_native_password
docker network create mysql84lab
docker volume create p2-data80

docker run --rm -v p2-data80:/var/lib/mysql --entrypoint mysqld mysql:8.0.46 \
  --no-defaults --initialize-insecure --user=mysql --datadir=/var/lib/mysql

docker run -d --name p2-m80 --network mysql84lab \
  -v p2-data80:/var/lib/mysql -v $PWD/conf:/conf:ro -v $PWD/results:/results \
  --entrypoint mysqld mysql:8.0.46 \
  --defaults-file=/conf/my80.cnf --user=mysql --datadir=/var/lib/mysql \
  --port=3380 --log-error=/results/my80.err

8.0.46 accepts both and complains about each in the error log:

[Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
[Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.

In 8.4 both are gone. expire_logs_days was removed, and the manual says starting mysqld with it “now results in an error”. default_authentication_plugin was removed in 8.4.0 in favour of authentication_policy (What Is New in MySQL 8.4). I see both in old config files a lot, usually copied from something written for 5.7.

A schema with problems on purpose

Each object below works on 8.0 and is listed as a problem in the same 8.4 chapter:

CREATE DATABASE legacy;
USE legacy;

-- AUTO_INCREMENT on a DOUBLE column
CREATE TABLE metrics (
  id DOUBLE NOT NULL AUTO_INCREMENT PRIMARY KEY,
  v INT
);

-- Words that are new keywords in 8.4 (MANUAL, PARALLEL, QUALIFY, TABLESAMPLE)
CREATE TABLE settings (
  id INT PRIMARY KEY,
  manual TINYINT,
  parallel TINYINT,
  qualify VARCHAR(20),
  tablesample INT
);

-- A foreign key that points at a non-unique index
CREATE TABLE parent (id INT PRIMARY KEY, code INT, KEY (code));
CREATE TABLE child (
  id INT PRIMARY KEY,
  parent_code INT,
  FOREIGN KEY (parent_code) REFERENCES parent (code)
);

-- An application account on the old plugin
CREATE USER 'legacy_app'@'%' IDENTIFIED WITH mysql_native_password BY 'legacy';
GRANT ALL ON legacy.* TO 'legacy_app'@'%';
docker exec -i p2-m80 mysql -uroot -plab -h127.0.0.1 -P3380 --show-warnings < sql/01-dirty-schema.sql
Warning (Code 3856): AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'id'.

That one warning is all 8.0.46 says - the foreign key to a non-unique index and the four column names all go through without a word. I’ve put a few rows in each table so there’s something to look at later on.

I omitted the case of partitioned tables with a prefix index in the partitioning key. 8.4 will reject those as well, but I wanted the schema to look like something I’d actually expect to encounter.

Running the checker

The checker lives in MySQL Shell and requires PROCESS and SELECT privileges on the server. It can check against any target from 8.0.11 up to the version of the Shell itself (Upgrade Checker Utility), so I used Shell 9.7.0 from the mysql:9.7.0 image and specified the exact target. The config path is important as some of the checks will read the file rather than the running server. The Shell container shares the server’s network namespace so 127.0.0.1:3380 is the server. The empty file mounted over /etc/my.cnf is there because the image has its own [client] section which points at a local socket and with that section in place mysqlsh -- util tried that socket rather than the address I’d given it:

docker run --rm --network container:p2-m80 \
  -v $PWD/conf/empty.cnf:/etc/my.cnf:ro -v $PWD/conf:/conf:ro \
  --entrypoint mysqlsh mysql:9.7.0 \
  -- util checkForServerUpgrade root:lab@127.0.0.1:3380 \
  --target-version=8.4.13 --config-path=/conf/my80.cnf

The end of the report:

Errors:   4
Warnings: 27
Notices:  2

ERROR: 4 errors were found. Please correct these issues before upgrading to avoid compatibility issues.

The four errors are three objects. default_authentication_plugin is reported twice (once in the system variable check and once by a separate check for authentication defaults). The other two are expire_logs_days and the DOUBLE column:

1) System variable check for deprecation, removal, changes in defaults values
or invalid values. (sysVars)
...
   - default_authentication_plugin: variable removed at version 8.4.0 is set to
   mysql_native_password (EXPLICIT)., consider using 'authentication_policy'
   instead.
   - expire_logs_days: variable removed at version 8.2.0 is set to 7
   (EXPLICIT)..
...
9) Checks for errors in column definitions (columnDefinition)
...
   legacy.metrics.id - The column is of type DOUBLE and has the AUTO_INCREMENT
      flag set, this is no longer supported.

The foreign key and the old account came back as warnings:

4) Checks for foreign keys not referencing a full unique index
(foreignKeyReferences)
...
   legacy.child.child_ibfk_1 - invalid foreign key defined as
      'child(parent_code)' references a non unique key at table 'parent'.
...
   Warning: The following users are using the 'mysql_native_password'
   authentication method which is deprecated as of MySQL 8.0.34 and will be
   removed in a future release.
...
   - legacy_app@%
   - root@%

The majority of the other 24 warnings are the list of changed defaults: innodb_change_buffering from all to none, innodb_adaptive_hash_index from ON to OFF, innodb_io_capacity from 200 to 10000 and so on, each one of those being a variable I hadn’t set. The two notices are about the SET_USER_ID privilege on the root accounts, which the upgrade removes.

Why did the four column names get absolutely nothing at all? The Shell will list every check that it has and the versions that each one applies to:

docker run --rm -v $PWD/conf/empty.cnf:/etc/my.cnf:ro \
  --entrypoint mysqlsh mysql:9.7.0 -- util checkForServerUpgrade --list
- reservedKeywords
  Usage of db objects with names conflicting with new reserved keywords
  Category: schema
  Condition: When the upgrade reaches any of the following versions: 8.0.11,
  8.0.14, 8.0.17, 8.0.31

An upgrade from 8.0.46 to 8.4.13 doesn’t cross any of those versions so the keyword check never runs. Only 11 of the 41 checks actually applied to this upgrade.

The JSON output (--output-format=JSON) has a manualChecks array for things the tool can’t verify and which it wants a human to look at. For this source and target it was empty:

jq '.manualChecks' results/checker.json
[]

Upgrading anyway

The 8.4 manual only lists dump/load or replication for going from 8.4 back to 8.0 and that’s only for rollback (downgrade paths). So before touching anything I stopped 8.0 and did a data directory copy to a second volume:

docker exec p2-m80 mysqladmin -uroot -plab -h127.0.0.1 -P3380 shutdown
docker run --rm -v p2-data80:/src -v p2-data80-copy:/dst debian:13 cp -a /src/. /dst/

Then I started 8.4.13 on the untouched data directory, with the old config and nothing fixed:

docker run -d --name p2-m84 --network mysql84lab \
  -v p2-data80:/var/lib/mysql -v $PWD/conf:/conf:ro -v $PWD/results:/results \
  --entrypoint mysqld mysql:8.4.13 \
  --defaults-file=/conf/my80.cnf --user=mysql --datadir=/var/lib/mysql \
  --port=3384 --log-error=/results/my84.err
[System] [MY-011090] [Server] Data dictionary upgrading from version '80023' to '80300'.
[ERROR] [MY-015118] [Server] AUTO_INCREMENT is not supported with DOUBLE/FLOAT field. Please consider fixing (Schema:legacy, Table:metrics, Column:id).
[Warning] [MY-015129] [Server] Foreign key 'child_ibfk_1' on table 'legacy'.'parent' refers to non-unique key or partial key. This is deprecated and will be removed in a future release.
[ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
[ERROR] [MY-010119] [Server] Aborting

I thought it would have stopped on expire_logs_days. It didn’t get that far. The DOUBLE column was what stopped the data dictionary upgrade (which is what the 8.4.0 release notes warn you about: if you leave a FLOAT or DOUBLE AUTO_INCREMENT column in place then “the table cannot be upgraded”).

I wanted to know what state that left the data directory in so I fired up 8.0.46 on it again. It came up fine and the three rows in legacy.metrics were still there. On this small schema, at least, the failed dictionary upgrade didn’t leave anything half-done.

Next I fixed only the table, on 8.0, and left the config alone:

ALTER TABLE legacy.metrics MODIFY id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT;

Second start of 8.4.13, same old config:

[System] [MY-011090] [Server] Data dictionary upgrading from version '80023' to '80300'.
[Warning] [MY-015129] [Server] Foreign key 'child_ibfk_1' on table 'legacy'.'parent' refers to non-unique key or partial key. This is deprecated and will be removed in a future release.
[System] [MY-013413] [Server] Data dictionary upgrade from version '80023' to '80300' completed.
[System] [MY-013381] [Server] Server upgrade from '80046' to '80413' started.
[System] [MY-013381] [Server] Server upgrade from '80046' to '80413' completed.
...
[ERROR] [MY-000067] [Server] unknown variable 'expire_logs_days=7'.
[ERROR] [MY-010119] [Server] Aborting

This was the result I didn’t expect. The server did the data dictionary and system tables upgrade first and only then read the config option it doesn’t know and refused to run. So the server is down and the data directory is already at 8.4. Pointing 8.0.46 back at it confirms that:

[ERROR] [MY-014061] [InnoDB] Invalid MySQL server downgrade: Cannot downgrade from 80413 to 80046. Downgrade is only permitted between patch releases.
[ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine

That’s what the copy is for. Without it, a typo-level config problem would have left me with a data directory that only 8.4 can open and an 8.4 server that won’t start.

The variables that have been removed are reported one per attempt. With expire_logs_days replaced by binlog_expire_logs_seconds = 604800 the third start failed on the very next line:

[ERROR] [MY-000067] [Server] unknown variable 'default_authentication_plugin=mysql_native_password'.
[ERROR] [MY-010119] [Server] Aborting

With that line gone as well, 8.4.13 came up. On this tiny schema the dictionary upgrade took about 0.08 seconds and the server upgrade about 1.1, going by the log timestamps. That tells you nothing about a real system. Dictionary upgrade time grows with the number of objects, so I’d time it on a restored copy of production.

What a checker can’t see

The checker reads the server. It doesn’t read your app, your cron jobs or the ORM that’s going to be creating a table next month. So with 8.4.13 running I tried the things that an application would do.

The old replication statements were removed in 8.4, not just deprecated (What Is New in MySQL 8.4):

docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 -e "SHOW SLAVE STATUS\G"
docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 -e "SHOW MASTER STATUS"
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SLAVE STATUS' at line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MASTER STATUS' at line 1

The replacements, SHOW REPLICA STATUS and SHOW BINARY LOG STATUS, work fine. The problem is the monitoring check or backup script that still sends the old ones. It fails on the first run after the upgrade, with a syntax error that doesn’t mention versions, and nothing on the server warns you beforehand. A grep -ri "slave status\|master status\|change master" across your repositories is cheap, and I’d do it before anything else.

Then a new foreign key on a non-unique column. The existing one got through the upgrade with a warning and it’s still working as it should: an insert of a child row with an existing parent code worked. Creating another one doesn’t:

CREATE TABLE child2 (
  id INT PRIMARY KEY, parent_code INT,
  FOREIGN KEY (parent_code) REFERENCES parent (code));
ERROR 6125 (HY000) at line 1: Failed to add the foreign key constraint. Missing unique key for constraint 'child2_ibfk_1' in the referenced table 'parent'

That’s restrict_fk_on_non_standard_key which is ON by default in 8.4. For a team with an ORM this probably shows up as a green upgrade, followed a week later by a schema migration failing in CI with an error nobody connects to the database version.

The four column names were the most interesting bit. The 8.4 manual’s list of new keywords lists all four as reserved. On 8.4.13 two of them work unquoted and two don’t:

docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 legacy -e "SELECT manual FROM settings"
docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 legacy -e "SELECT parallel FROM settings"
docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 legacy -e "SELECT qualify FROM settings"
docker exec p2-m84 mysql -uroot -plab -h127.0.0.1 -P3384 legacy -e "SELECT tablesample FROM settings"
manual
0
parallel
1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'qualify FROM settings' at line 1
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'tablesample FROM settings' at line 1

The explanation is in the 8.4.11 release notes: QUALIFY and TABLESAMPLE “were not properly defined as reserved keywords” and MANUAL and PARALLEL were not properly defined as non-reserved. The 8.4 keyword list now states that MANUAL and PARALLEL became nonreserved in 8.4.11. So it depends on which patch release you land on. I only tested 8.4.13. Upgrading the schema didn’t complain, the table is fine and the first unquoted query against qualify fails.

Last, the old account. Community 8.4 doesn’t enable mysql_native_password by default:

docker exec p2-m84 mysql -h127.0.0.1 -P3384 -ulegacy_app -plegacy -e "SELECT CURRENT_USER()"
ERROR 1524 (HY000): Plugin 'mysql_native_password' is not loaded

After a restart with --mysql-native-password=ON, the same login works:

CURRENT_USER()
legacy_app@%

The checker did warn about that account so this one isn’t a miss. I’d still treat that flag as a bridge and part 5 is about the drivers on the other side of it.

What this lab doesn’t tell you

It’s one little schema that I wrote to be broken. Yours is bigger and older and broken in ways I hadn’t even considered so a clean run here says nothing about it. I didn’t test stored programs or views with removed syntax, character set remnants from 5.7, or partitioning. I also ran a single Shell version (9.7.0) and other versions may have different checks.

Verdict

Run the checker and fix every error it reports prior to the first 8.4 start. It picked up the DOUBLE column, both the config lines, the foreign key and the old account. It said nothing about QUALIFY and TABLESAMPLE, which break queries on 8.4.13, and it can’t see code that sends SHOW SLAVE STATUS.

The config result is the one I’d remember. A removed variable in my.cnf doesn’t stop the upgrade, it stops the server after the upgrade and by that point you can’t go back in place. So take a copy of the data directory (or a snapshot) prior to the first start, grep the code for removed statements and then start 8.4 up with the new config file against a restored copy before you do it for real.

Part 3 starts from a clean schema and looks at something the checker only lists as warnings: the default values that changed, and what they do to performance.

Back to contents