HOW-TO Synology - Migrate your databases from MariaDB 5 to MariaDB 10
#1
This is probably a piece of cake for the die-hard Kodi user but for the lesser gods (I am one of them Smile ) I decided to provide some information on how to upgrade from MariaDB 5 to MariaDB 10 on a Synology NAS.

So here is the step by step:
  • Log in on PHPMyAdmin on your Synology making sure you select MariaDB 5 as the database
  • Select database MyMusic** and export to a local folder with default settings (for Leia it is MyMusic72)
  • Select database MyVideos** and also export to a local folder (preferably the same Wink ) with default settings (for Leia it is MyVideos116)
  • Go to Package Center and search for MariaDB 10.
  • Make sure it is installed and running
  • Search for MariaDB 5 and stop the service!
  • Go back to PHPMyAdmin and make sure you login to MariaDB 10
  • Create a user to access the databases (generally xbmc with password xbmc) and allow access to all databases (this could be handled better but it works for me)
  • Create a new database MyMusic** (make sure the number is the same as the one you exported)
  • Select the newly created database
  • Import the database MyMusic** you exported earlier
  • Create a new database MyVideos** (make sure the number is the same as the one you exported)
  • Select the newly created database
  • Import the database MyVideos** you exported earlier
  • Edit the file advancedsettings.xml on your KODI client(s)
  • Change port 3306 to port 3307 on all instances
  • Save the file
  • Reboot the device
  • Enjoy! Big Grin
If all is working you can safely uninstall MariaDB5 provided you have no other databases running on it.

This step-by-step worked for me. Let me know if it worked for you.
MiBox running KODI app (latest)
Synology DS215+ - 8+6 TB | Synology DS211 - 4+4 TB - No RAID | Homebrew server Ubuntu server - 10 TB - LVM | Ubuntu Server 18.04.01 -10 TB - RAID5
Philips 50PFK5300 | Sony HT-XT100 Soundplate
Scanning my media with MediaElch
Reply
#2
Any speed increases or problem noticed with MariaDB 10? You can verify the kodi.log by enabling debugging and also activating its Database component for extra info on query times etcetera.
Reply
#3
Not really noticed an increase of speed but that was not the goal of the exercise. I wanted to have one version of MariaDB on my NAS and a more future proof version as well. Both goals have been achieved.

Btw no issues either so that's a good thing :-)

Will have a look at performance in the coming days though.
MiBox running KODI app (latest)
Synology DS215+ - 8+6 TB | Synology DS211 - 4+4 TB - No RAID | Homebrew server Ubuntu server - 10 TB - LVM | Ubuntu Server 18.04.01 -10 TB - RAID5
Philips 50PFK5300 | Sony HT-XT100 Soundplate
Scanning my media with MediaElch
Reply
#4
Have been thinking about doing the same for some time but never got around doing it. Your guide inspired me to take the plunge. Worked beautifully. After 20 minutes, everything was done. Many thanks!
Reply
#5
Thanks for this post, worked perfectly! Actually wondered why my synology had two mariadb versions and found this. Really apreciate the step by step for database noobs like me!
One very small thing: here it would not accept kodi as a password, it insisted on a strong password. I simply made one and also added that to advancedsettings.
Reply
#6
(2020-04-16, 15:04)kees667 Wrote: Thanks for this post, worked perfectly! Actually wondered why my synology had two mariadb versions and found this. Really apreciate the step by step for database noobs like me!
One very small thing: here it would not accept kodi as a password, it insisted on a strong password. I simply made one and also added that to advancedsettings.

Hi Kees,

Glad it worked for you. It might be possible that in the mean time things have changed a little bit. Appreciate the fact that you added this for future reference!

Greetz,

_J@n_
MiBox running KODI app (latest)
Synology DS215+ - 8+6 TB | Synology DS211 - 4+4 TB - No RAID | Homebrew server Ubuntu server - 10 TB - LVM | Ubuntu Server 18.04.01 -10 TB - RAID5
Philips 50PFK5300 | Sony HT-XT100 Soundplate
Scanning my media with MediaElch
Reply
#7
Hi there,

thanks for the great tutorial!

BTW you are enforce to execute this upgrade on your own, when you try to update your Synology to DSM 7.0 Rolleyes
It looks like Synology wants to get rid of potential unsecure packages. In my case the setup was interrupted because of the installation of Java 8 and MariaDB 5.

Gr33tz,
niKoN
Reply
#8
Hi, thanks for the tutorial! I mistakenly imported my database before creating the xbmc user in MariaDB10. It showed an error message but I can confirm the database is imported. So I created the user after. Not at home right now but what I can say is MariaDB10 has been using 80+ % of my Synology CPU power (DS916+) for around 4 hours now. My database, once imported, was about 20MB. Don't know if it's a bug created by the lack of the xbmc user or if it just takes time to convert the database... Looks like my Kodi instances struggle to connect to it for now (can't really check from outside my network, even with a VPN it's kind of hit or miss). I'll checkcloser tonight, Ij ust wanted to report from my end.
Reply
#9
(2021-10-04, 14:52)morback Wrote: Hi, thanks for the tutorial! I mistakenly imported my database before creating the xbmc user in MariaDB10. It showed an error message but I can confirm the database is imported. So I created the user after. Not at home right now but what I can say is MariaDB10 has been using 80+ % of my Synology CPU power (DS916+) for around 4 hours now. My database, once imported, was about 20MB. Don't know if it's a bug created by the lack of the xbmc user or if it just takes time to convert the database... Looks like my Kodi instances struggle to connect to it for now (can't really check from outside my network, even with a VPN it's kind of hit or miss). I'll checkcloser tonight, Ij ust wanted to report from my end.

Looks like I can't edit my previous message. Well I confirm that creating the specific user BEFORE importing the database is mandatory. That was presumably a bug and uninstalling / reinstalling MariaDB 10 + following the tutorial worked perfectly.
Reply

Logout Mark Read Team Forum Stats Members Help
HOW-TO Synology - Migrate your databases from MariaDB 5 to MariaDB 100