Migrating MySQL from Pi3 to Pi4

Hi all,

Had a good look around and can’t see an existing guide for this but with the recent release of OSMC for Pi4 I’m guessing there’ll be a few of us wanting a step by step before trying to move from Pi3.

I have an existing Pi3 OSMC setup with MySQL audio and video libraries. I’ve never had a great deal of luck when trying to export the libraries from inside OSMC and my only other idea is to use phpMyAdmin to transfer from 3 to 4.

Anyone know of a sure fire way of doing this?

Cheers!

That is one way. Another would be to copy the whole /var/lib/mysql folder (would need to stop mysql for that and ensure your mysql versions are identical.

Any idea of how likely that’s going to be with the update to 19.1?

What to be likely? Same Mysql versions? That would not be a question of Kodi but the underlying OS so if you upgrade OSMC on both devices to the latest then they should have same MYSQL version.

OK, so as long as the new installs are all on the same OSMC versions (which they all will be) it doesn’t matter about the version of MySQL the libraries were exported from?

Then the MYSQL version will be identical so the question doesn’t make sense

The version of OSMC the MySQL database will originate from will be different to the one it is going to be exported to (19.1) if this doesn’t have any impact then all is well.

Well first you said “on the same OSMC” so I don’t understand why you now say “will be different”.
Anyway it seems also you are missing up MYSQL application versions and Kodi MYSQL Database.

  1. If you export/import using phpmyadmin the MYSQL application versions don’t make an issue as long as they are fairly similar (not 10 years between them)
  2. Kodi MYSQL Databases are also ok if they are different as they automatically update to the latest database version on the next start (just ensure Kodi is shutdown when you migrate the database).

Identical MYSQL application versions (which I mentioned) are only needed if you don’t do the export/import solution but just copy the whole MYSQL folder /var/lib/mysql which I described.

OK, thanks. Appreciate the assistance.