Kodi Community Forum

Full Version: MYSQL Sync
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I like the sound of using MYSQL as a central DB to sync Kodi

The wiki says the DBs change with each new version of Kodi so Kodi Upgrades pick this up and upgrade the DB

I have one question if I was to set this up now with Kodi 15 then in the future point a Fresh Install of say Kodi 17 to my SQL DB what would it do ?

Would it update the old DBs ??

Thumbnails sync also seems to make sense so thumbs would get generated once and only hammer the CPU once ?
(2016-09-21, 13:49)Silki Wrote: [ -> ]I have one question if I was to set this up now with Kodi 15 then in the future point a Fresh Install of say Kodi 17 to my SQL DB what would it do ?
Kodi creates database files called MyVideos# and MyMusic#. The number is different for the different versions of Kodi. For example, in my mySQL database an earlier version of Kodi created MyVideos99. I am using Krypton now and when I installed that, an earlier "MyVideos106" was copied to "MyVideos107" which is used by Krypton. If I use a computer that still had an earlier Kodi version, it would use its version on the database. The newer Kodi version uses its version. They are not shared, but they both still work. If you add something when using the newer Kodi version, it is added to its database, but it is not added to the database for the earlier database (eg using Krypton, new content is added to MyVideos107 - if you use Kodi 15, that will be accessing MyVideos[whatever, I don't know the number] and won't show any of that added content.

tldr: you get multiple versions of the database. Each version is separate.

(hope this makes sense, it's early and I haven't yet had my second cup of coffee)
Yes when a new version of Kodi detects an old database, it makes a new database that is updated to match it but all data is copied from the old database.

Though if you are using betas, it could do this early. Say, you normally run Kodi 16 but you tried out a Kodi 17 alpha, when you started that alpha it would have made an updated copy of the database. You then go back to Kodi 16 for six months because you were playing with the alpha not making it your regular use. Now it's six months later and you want to use the 17.0 Stable since it was released. Oops, you have a six month old database that Kodi 17 will use, with all of it's info and watched statuses being six months out of date. So you'd have to either re-import data from a more recent database backup or drop that database so that it's not there any more when you finally switch to 17 and it builds a new copy of the database since it doesn't detect a pre-existing one for 17.
Great, so new versions simply grab the DB data and use it in a New DB.

Re "Thumbnails sync" i have now read that this is not a good idea ??