The Blog Moves to MariaDB

I’m running a lot of the services I host on my own in Docker containers these days. This makes it pretty much worry free to run and update them. This blog is no exception, it’s been running in containers for two years now. But container images age as well, and from time to time one should have a look if one is still on a stream of a supported version. Case in point: The MySQL container that runs the database of this blog. So far, I’ve been using the MySQL 5.7 stream of Docker images. However, MySQL 5.7’s long term support will end in October 2023, so it was time to go to the next version. A nice quick project to do while at GPN21. It should have been be worry free, no? After all, it’s a container image. Well, not quite.

MySQL Version Trouble

For one reason or another, Oracle decided to go from MySQL version 5.7 straight to version number 8. But that’s just a number, so I went ahead and simply replaced 5.7 with 8 in my docker-compose.yml file. The spectacular effect: Nothing worked anymore. No problem, I obviously made a backup and a snapshot before to be on the safe side, so I could easily revert. I had a look at the error messages in the log, but they were pretty much non descriptive. A web search revealed that other people were getting similar errors. The only solution that was suggested, however, was to dump the database to a text file, go to version 8, and import the database again. Really!? Guys, were are not in the 1960s anymore!

Giving MariaDB a Go

As things got difficult from the start, I decided to do one other thing, and that was moving from MySQL to MariaDB. There’s a long story behind this and I don’t want to go into the politics of it, but that’s what I originally wanted to do anyway. However, I didn’t dare, because I’m happy as long as things work. But they didn’t at this point. So instead of changing from 5.7 to 8 in the docker-compose.yml file, I changed

image: mysql:5.7

into

image: mariadb:10

And…. everything worked right away. No complaints, no error messages in the log, things just worked. Incredible, Oracle can’t make the migration from one version of their software to another work, while the competition gives me a smooth transition to their software!?

So in the end, I got both things I wanted: A smooth upgrade process and the database engine I actually wanted to have for quite some time now. Well done MariaDB!