MySQL 8.4.0 with Docker-Compose
Since I didn't see this anywhere, I wanted to ensure it was documented somewhere so that aimless Googling didn't result in giving up. Not even ChatGPT had the answer.
If you're upgrading WordPress with a MySQL backend tagged to mysql:latest and you currently use this command switch in Docker-Compose for legacy application functionality
command: {"--default-authentication-plugin=mysql_native_password"]
That will no longer work in MySQL 8.4.0. You'll get this error:
Error establishing a database connection
You might also see this error in your logs:
unknown variable 'default-authentication-plugin=mysql_native_password'.
You may see this error when you try to open a command shell inside of MySQL
mysql: ERROR 1524 (HY000): Plugin 'mysql-native-password' is not loaded
This is due to rearchitecting the way that legacy authentication works.
This command has been replaced with this:
command: ["--mysql-native-password=ON"]
I could not find this documented anywhere other than a low ranked post on Stack Overflow. Now it's on a blog. Hopefully this helps if you're googling any of the aforementioned errors.
Member discussion