Skip to content

Unraid MySQL Docker Upgrade problem

When I was going through my docker containers on my Unraid server, I noticed a fair few of them needed updated. Luckily, Unraid has an update all button! Uh oh.

If you used any of my services, you’ll be aware that during the night all my databases were offline and I had no idea about it because the service which also does my status checks, never came back up either. I didn’t think much of it because surely these were minor upgrades done to the docker containers right? Oh boy.

It turns out, when you upgrade the instance, it just…. pulls the latest docker image available. So if we check MySQL Docker

Unraid automatically pulls the ‘latest’ tag, we can see that the latest tag is now pointing to the new major version of MySQL 9.0. Not MySQL 8.

This meant when my instance came back up, it went through the upgrade script to try convert my databases over to MySQL 9, but it couldn’t because in order to do that you need to be on the latest MySQL 8 version (8.42, or something like that). Which I hadn’t been on because I haven’t updated the containers in some time. Automated updates tend to lead to problems like Crowdstrike. So what I had to do was roll back my Docker container to the last valid version (8.3) then put it onto 8.42 which would then if I wanted to allow me to go to Version 9.

But the problem here more than anything is this latest tag, it seems entirely inappropriate, I feel like there should be some understanding that the latest version of a container especially when it moves major versions isn’t appropriate. So I’ve changed my configuration now to have set version numbers. You can change this by changing the repository name:

In my research everywhere it seems that there are numerous community posts about this problem. However it seems to change year on year what this field is actually called. As of July 2024 it’s called Repository.

You can find the available tags on the MySQL Docker documentation:

So after all that. I rolled things back, it all works again, happy days! Now I probably could change my version to 8 rather than specifically 8.4.2, but I’ll look into that again when I come to update it…