Convert databases from MySQL 8 to MariaDB 10

OS type and version Ubuntu 20.04
Webmin version REQUIRED
Virtualmin version REQUIRED
Related packages SUGGESTED

Hi there,
With all of the CENTOS EOL, we decided some time back to switch from CentOS 6 to Ubuntu 20.04 LTS.
At the time, VirtualMin default DB on Ubuntu was MySQL, so we undertook the arduous exercise of converting all our databases to MySQL 5.6, then upgrading to MySQL 8.

However, we see that with VirtualMin for Ubuntu 22.04 LTS, the DB has been switched to MariaDB.
This is our preferred choice, but we are now stuck with Databases on MySQL 8.
Does anyone know how we can convert MySQL 8 Databases to MariaDB 10?


It is doable but not advisable. The best solution that your should go with, is to clean re-install on Ubuntu 22.04, which has MariaDB out of the box. It is faster and more reliable.

Thanks Ilia,
I’m happy to do that move and re-install.
However, what I’m trying to understand is what I then need to do to get the existing MySQL DB’s running on MariaDB? Do I just do a SQL dump from MySQL and restore onto MariaDB?

You’d need to dump the existing databases and restore them.

A Virtualmin backup/restore does a dump and restore, so that’s probably taken care of…but, it’s worth being aware that MySQL and and MariaDB have diverged a bit in recent years, and it’s not always possible to do a straight dump restore, if you’re using unique features/syntax in MySQL. (In which case, you’ll need to dig deeper than my knowledge of the subject, to figure out how you need to munge the data to make it work.)

I’ve never tested.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.