Upgrade MariaDB -is there a safe way? (instructions needed)

Operating system: CentOS 7 64bit
OS version: CentOS Linux 7.9.2009
DB server version: MariaDB version 5.5.68

Hi guys (and ladys),
I need help with instructions, if there is a safe and proven way to upgrade MariaDB Database server on Virtualmin.
I know, there are old threads with some instructions, but in the past when I’ve attempted to do it, it failed my entire Virtualmin installation.

So, decided to ask if there is a new, safe and proven approach to this? Will appreciate it, since the outdated DB server is definitely not as performant, as it could be with an up-to-date DB.
If, for some reasons, such upgrade is NOT recommended, I would appreciate if you confirm that, as well.

Thank you.

ps. my server is production, but is not in much use, so I have some room to experiment.

The very first thing I would do is back up all of your databases. Put them on an external drive for safe keeping. That way, if something does go south in your upgrade you can always just use PhpMyAdmin and reimport them into a new database on the upgraded system, and you’re good to go.

1 Like

Goes without saying :slight_smile: But I need to know the correct path to do the upgrade safely, if that is possible at all, of course.

It is not recommended, unless you have a damned good reason for doing it. That’s always the case. I always recommend you use the packages provided by your OS unless you have a critical need that is unmet by one or more of those packages. I always recommend you start with an OS that provides the packages you need, rather than starting with an old OS version and picking and choosing random packages to upgrade.

That said, on the one server where I absolutely had to have MariaDB 10 to work with a particular app, and before CentOS 8 was out, I used a mariadb 10 repo from SCL. Directory — Software Collections

I can recommend SCL packages when you need a newer version of something in CentOS. (But, again, what I really recommend is using what your OS provides.)

The process of upgrading MariaDB itself, however, is not a Virtualmin question. It is best taken up with the MariaDB docs and community. It is usually at least a dump/restore for major version changes, but may be more complicated than that or there may be some in-place upgrade process, depending on how many major versions you’re skipping over. But, usually a dump/restore will get you most of the way there.

Basically, you don’t recommend me to do such upgrade, unless I have some very special need for it?

Of course! Why would you upgrade something that works fine and is well-maintained by the OS developers? What good could possibly come of it?

And, even if there is some good (i.e. a minor performance improvement for some operations), there is a down side. The SCL packages have no guarantee on how long they’ll be maintained, and they are much more loosely maintained than system packages. They’re volunteer-driven and make no promises. They could be unmaintained tomorrow, and you’d be stuck running potentially buggy or insecure software for months or years until you migrate to CentOS 8. (That’s unlikely for a popular package like MariaDB, but not unheard of. There were some PHP 5.x packages in SCL for CentOS 7 that are now unmaintained, for example).

If you want new software, use a new distro version. CentOS 8 has MariaDB 10. Otherwise, use what you’ve got, unless and until you can’t for some real, measured, technical reason.

1 Like

Thank you very much for your help and I intend to stick to your advise.

I don’t feel OK to upgrade to CentOS 8 at this time and with all this uncertainty with CentOS future, so I’ll stick to what I have.

Once again - many thanks and all the best to you and the team behind Virtualmin!