Kodi Community Forum

Full Version: Best practice to migrate from MySQL to MariaDB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all, 

I had a complete catastrophe in my server rack a couple months back, and I am slowly rebuilding. I've been using MySQL for my Kodi installs forever, however I'm wondering if I should take this opportunity to migrate over to MariaDB. My Kodi MySQL database survived the chaos over here, so my question is: what is the best way to migrate that over to MariaDB?

Backup and restore at the db level?
Export and import the Kodi library? (and if I do that as a .nfo file dump, what happens to anything special I have in existing .nfo files?)
Other?

Thanks for your time. Any help appreciated. This is just latest in my quest to get back to normal.
(2022-11-15, 23:34)Spall Wrote: [ -> ]however I'm wondering if I should take this opportunity to migrate over to MariaDB.
Why? As long as your hardware is running okay, a database server should be too. Software hiccups are rare on servers.
I've been running MySQL 5 thru 5.7 on Linux since 2008, and it still runs.

(2022-11-15, 23:34)Spall Wrote: [ -> ]Backup and restore at the db level?
SQLdumps are a good start.

(2022-11-15, 23:34)Spall Wrote: [ -> ]Export and import the Kodi library?
Choose to export to separate nfo files, not as a single nfo export file.
Also first enable the watched/resume status options in the advancedsettings file, if you want to conserve those.
(2022-11-16, 08:51)Klojum Wrote: [ -> ]Why?

Hmm. I guess I don't have a super good reason for that. I have MySQL running in a docker container (from the linuxserver.io guys). They deprecated it around the time Oracle bought MySQL, so it hasn't had an update in years. I guess my thinking was I'd have to do it _eventually_, so why not do it now while I'm in reconstruction mode. However, you're right in the sense that if it's working it's unlikely to stop, especially since it isn't getting any updates and just chugging away in its little sandbox. It is not lost on me that I've maybe not ever had any problems with MySQL _because_ it hasn't been updated in a while.

The other part of the equation was my main Kodi box is running on a NUC via libreelec. I've been on Leia up until this point, and I understand for upgrading libreelec to use Matrix they recommend a clean install. I think I had been considering migrating my db to MariaDB in another container and just shutting down and keeping the MySQL instance in an archive. Then installing libreelec 10 on a fresh USB stick and keeping the old stick untouched. So my old setup would be preserved just in case anything went south.

Thanks for the reply and help. Smile
One other thing I encountered is that MySQL dumps aren't always 100% compatible with MariaDB (or vice versa). Certain server settings can hinder the transfer of data of those dumps. MySQL 5.7 is still actively supported (not for long anymore I believe), but testing/transferring to the MariaDB database server had its bumps in the road. Just like MySQL 8.x has its own "unique" challenges.

I just wouldn't change my database server for the heck of it. Give MariaDB a proper test for some time to familiarize yourself with it, as it is not the same as simply flicking a switch. I just might keep using MySQL 5.7 till the end of days, Kodi won't change that drastically database-wise in the foreseeable future.
Understood.  Thanks again Smile
do yourself a favor and embrace Jellyfin as 'backend' for Kodi...
Agreed on the back-end recommendation.  I've run run Mezzmo for many years, for the same reasons as Jellyfin and have never looked back.  Kodi client management is all automatic.


Jeff