Upgrade From 10.7.4 to 10.8.3 Crashes MySQL / MariaDB

People warned me about the bleeding-edge headaches that would come with hosting WordPress blogs on Arch Linux. Fearless, I press onward, with help from the Internet. Here’s my small contribution to my fellow Arch admins looking for answers. Fear not daemon slayer.

Thankfully, this anonymous person gave me a general idea of how to solve the problem.

But let me stop you there. If you haven’t already upgraded, here’s a shortcut. Run mysql_upgrade before you upgrade MariaDB aka MySQL. Basically, you may need to upgrade your database before upgrading the MariaDB software.

I say “may” because one of my servers didn’t need mysql_upgrade. For example:

This installation of MariaDB is already upgraded to 10.7.3-MariaDB.
There is no need to run mysql_upgrade again for 10.7.4-MariaDB.

But my slightly older server did need an upgrade:

Major version upgrade detected from 10.6.4-MariaDB to 10.7.4-MariaDB. Check required!
Phase 1/7: Checking and upgrading mysql database

In any case, until someone tells me otherwise, next time I plan to run mysql_upgrade before upgrading MariaDB. So that this doesn’t happen again.

Assuming you already upgraded to 10.8.3, and it crashed, and you don’t have a time machine to go back and run mysql_upgrade, here’s what I recommend you do. You need to decide how far back you want to go with your downgrade. For me, I still had a working server using 10.7.4 and apparently “Mike” had the same problem upgrading from 10.7.4, so it made sense to downgrade to 10.7.4. Of course, your situation could be different, which is why I’m writing this for future reference.

But how do you downgrade MariaDB when mariadb, mariadb-libs, and mariadb-clients all depend on each other? For me this was a new problem. Here’s the solution. Go here https://archive.archlinux.org/packages/m/ and find the three .zst files you need. Then wget the files, for example:

wget https://archive.archlinux.org/packages/m/mariadb/mariadb-10.7.4-1-x86_64.pkg.tar.zst

Once you have the three files downloaded (with matching versions) you can downgrade all three of them at the same time, like this:

pacman -U mariadb-libs-10.7.4-1-x86_64.pkg.tar.zst mariadb-10.7.4-1-x86_64.pkg.tar.zst mariadb-clients-10.7.4-1-x86_64.pkg.tar.zst

Could you pass the URLs directly to pacman, to skip the download step? I don’t know, I didn’t think that far ahead.

Anyway, systemctl restart mysqld and your blogs/websites should be back online. However, you’re still stuck on an old version. If you didn’t already, run mysql_upgrade, and then run pacman -Syu or whatever you normally do to upgrade MySQL/MariaDB.

You saved the day! Realize how good you feel. I think you deserve a raise.