On MySQL 8.4 (and the end of MySQL 8.0)

Given that MySQL 8.0 is officially EOL since end of April 2026, I thought I’d check the state of Neos & Flow with MySQL 8.4 (which has another five years to live).

TL;DR: Nothing left to do in Neos itself for 8.4. The required fixes are already in the 8.4 releases, and a local test against MySQL 8.4 confirmed this. #5656 is planned for Neos 10.0 and isn’t needed for the switch.

Status of the issues

Local test

Tested with the current 8.4 state (Neos 8.4.8+, Flow 8.4.6, DBAL 3.10.6) against local Beach database containers:

Check Result
doctrine:migrate on an empty database, MySQL 8.4.11 all 154 migrations ran
doctrine:validate no mapping errors
Fresh schema on 8.0.46 vs. fresh schema on 8.4 identical
mysqldump of an 8.0 database imported into 8.4 import worked, schema identical

What remains for the switch

The remaining risks are operational, not in the Neos code:

  1. Neos version: Fresh installs, and anything that runs doctrine:migrate on an empty database (CI, local setups), need at least Neos 8.3.29 or 8.4.x.
  2. mysql_native_password is disabled by default in 8.4. Database users created on 8.0 with this plugin can’t log in after the upgrade. Switch them to caching_sha2_password beforehand. PHP pdo_mysql has supported it since PHP 7.4.
  3. restrict_fk_on_non_standard_key=ON: MySQL 8.4 rejects new foreign keys that point to non-unique keys. The standard Neos schema isn’t affected, as the dump/import test shows. Restores of very old customer databases or third-party packages could still fail on this, so do a test restore before switching.

Pre-upgrade check

The SQL from Pre-update check for MySQL 8.4 · GitHub when run on the existing 8.0 server, using a user who has read access to the mysql.user table, e.g. like this:

mysql -u root -p -t < mysql84-precheck.sql

should help. Here’s how to interpret the result:

  • Check 1 lists all accounts with mysql_native_password and provides the corresponding ALTER USER statement for each one. You must substitute the password yourself, as MySQL does not know it in plain text.
  • Check 2 distinguishes between two cases:
    • BLOCKER: The foreign key points to a key that is not unique or is only partially unique. A restore to 8.4 will then fail. Solution: create a UNIQUE index on the target columns or remove the foreign key.
    • WARNING: The referenced table does not exist. I have tested that 8.4 accepts this during a restore (set FOREIGN_KEY_CHECKS=0 in the dumps). The foreign key is still dead weight and can be removed.

Restriction: Check 2 requires that the columns of the foreign key correspond exactly to a PRIMARY or UNIQUE index, in the same order. This is rather stricter than MySQL itself. In case of doubt, therefore, there is a false alarm, but no missed issue.

Do you have experience with MySQL 8.4 already?

I just know that Denny added ci for MySQL 8.4 last year in

And i just now raised compatibility for Neos 9 to MySQL 9.7:

On the docs it does not say yet whats supported though

And we should denote that 8.4 or 9.7 are available - at leas the test run.
(In Neos 9 and up - Neos 8.4 i dont know)

#please-write-human-messages

  • I know we run tests against 8.4 – but the tests do the DB setup not using migrations. That was one thing I wanted to actually check.
  • MySQL 8.0 is EOL, so we need to address this more prominently.
  • About MySQL 9 – great, even better. No adjustment to the docs along with the PR, well.

The migrations are executed for all databases we run the tests with in a dedicated step:

But yeah, the tests itself do not use the migrations.

2 Likes