What happens to MySQL when upgrading?

We have a openSUSE 12.2 server that I want to upgrade. It is a production server and I want all the latest security patches. If I understand correctly, I should be able to upgrade forward to each version 12.3, 13.1, 13.2, LEAP 42.1 without much problem. But my main question is what happens to MySQL. I know that the standard now is MariaDB instead of MySQL. But if I don’t specifically address that in the upgrade process, will it upgrade to MariaDB or stay on MySQL? I know to have backups etc…but wanted to know if anyone had real world experience with this particular problem. Would it install Maria or would it leave MySQL and let me address that at a point in time after the upgrade. I know MariaDB is supposed to be a drop in replacement…

Thank you.

upgrading should keep the same apps

Note depending on hardware and set up even going step by step it is a large leap moving that far and there may be problems. Since it is a production server you should have a recovery plan well in mind before starting.

With each version, there is an upgrade script but I am not sure you would be able to get all the intermediate versions with their respective upgrade scripts to move from where you are to where you want to be. This applies both if you retain mysql and if you move from mysql to mariadb.

In practice, given the antiquity of your mysql version, you may find it is quicker to use mysqldump followed by installing the latest version of mysql or mariadb and then restoring the data from mysqldump. Bear in mind that mariadb does not promise drop-in compatibility after mysql 5.5. So, if you move to mariadb, you may not be able to go back to mysql depending on the complexity of your setup.

Generally speaking (I have not heard any newer recommendation),
applications in general and database apps like MySQL specifically should be handled separately from the OS upgrade and needs to be researched well before proceeding.
I would also add my own personal recommendation to perform trial upgrades in a virtual machine before performing your actual upgrade since most virtualization supports easy cloning, snapshotting and rollbacks to aid your upgrade path.

The first thing to determine is the new requirements for the database app running in your upgraded system, it’s generally never even close to the current system before upgrading. Especially with MySQL, there can be significant architectural changes, particularly supported database connectors(and middleware).

You may also want to consider in-place upgrading vs migration (to a different machine) strategies.

Then you can consider the various actual options available to you which might include

  • Backup and Restore. Probably most common for both in-place and migration.
  • Forklift which is when you can simply detach and attach a database. Simplest if can be executed, but not always possible.
  • Shipping. More typically a “live” transfer of data between servers, might be easiest in a migration strategy.

You will have to research the specifics of what you are trying to do moving from your current version of MySQL to the upgraded version, it’s less likely that your MySQL upgrade procedure will have anything to do with the underlying OS. Find blogs that describe others’ experiences, read the official documentation. If you want to ask questions (most likely in a MySQL forum or IRC), be sure to be specific about your MySQL versions.

As always, this is typically a highly risky procedure dealing with important and often irreplaceable data. Always make sure you have at least one if not more verified backups of your MySQL data as well as a backup of your system before upgrade (And make sure you know how to restore and have tested). Be extra careful with your data.

HTH,
TSU