Kodi Community Forum

Full Version: Krypton migration, mysql database unaccessable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been running on v16 for a long time, running it on my Windows PC, My Android Tablet and on a raspberry pi as OSMC. I just started upgrading to Krypton, it started with my tablet doing it on it's own. It lost connection with the database and I haven't been that hassled by it since I rarely use it.

I had to reinstall my raspberry pi version and it came with Krypton. As soon as it was installed I edited the advancedsettings.xml so that it points to the MYSQL database, it was pretty much just a copy+paste of the old one. For some reason it didn't seem to work. the videos wouldn't show up and the it would not update the library even if asked manually, however, the music library was still intact. Even if I hadn't even mapped the music yet, the database was present. the kodi user for mysql has granted complete control of the database so it doesn't seem to be a privilege problem.

So I thought maybe there had to be an update script run on the database that happens at first run on krypton. So I also updated to krypton on my windows desktop, at first run it tells the user to wait until the addon scripts have been migrated, nothing happens and when the window is focused on it tells me that I can either wait longer or it can stop the process. I let it run for 10-15 minutes but nothing happened (the dots after "please wait" were animated though)

So here I am, none of my krypton installs can do anything with the video database on mysql server, I rather not just drop the database and rebuild it and there's no guarantee that that's the problem.

Searching for mysql in kodi forum havent' come up with much so it's seems that my problem is fairly isolated. The advancedsettings.xml on my windows installation of kodi has not been edited after installation, it still has the old date.

Last Minute update. I checked the log on my windows machine before posting and it says

19:37:42.982 T:2264 NOTICE: Attempting to update the database MyVideos107 from version 99 to 107
19:37:42.986 T:2264 ERROR: SQL: [MyVideos107] Undefined MySQL error: Code (1060)
Query: ALTER TABLE seasons ADD userrating INTEGER
19:37:42.986 T:2264 ERROR: Exception updating database MyVideos107 from version 99 to 107
19:37:42.986 T:2264 ERROR: Error updating database MyVideos107 from version 99 to 107
19:37:42.991 T:2264 ERROR: Unable to open database: MyVideos106 [1049](Unknown database 'MyVideos106')
19:37:42.994 T:2264 ERROR: Unable to open database: MyVideos105 [1049](Unknown database 'MyVideos105')
19:37:43.000 T:2264 ERROR: Unable to open database: MyVideos104 [1049](Unknown database 'MyVideos104')
19:37:43.003 T:2264 ERROR: Unable to open database: MyVideos103 [1049](Unknown database 'MyVideos103')
19:37:43.007 T:2264 ERROR: Unable to open database: MyVideos102 [1049](Unknown database 'MyVideos102')
19:37:43.011 T:2264 ERROR: Unable to open database: MyVideos101 [1049](Unknown database 'MyVideos101')
19:37:43.015 T:2264 ERROR: Unable to open database: MyVideos100 [1049](Unknown database 'MyVideos100')
19:37:43.020 T:2264 NOTICE: Old database found - updating from version 99 to 107
19:37:43.021 T:2264 ERROR: SQL: Can't create database for copy: 'MyVideos99' (1007)
19:37:43.021 T:2264 ERROR: Unable to copy old database MyVideos99 to new version MyVideos107


EDIT: There IS a database in my server called MyVideos107, it does contain a bunch of tables and the tables do contain data. The old database (MyVideos99) is still present as well. Both movie tables has the same amount of entries.
As Kodi upgrades, it migrates the data, but leaves the old versions untouched. You could take an SQL export of your old data if you need to, and then drop all the Krypton databases before trying again.

I say that not because I'm an expert, but only because my upgrade failed, but clearing out all the old (pre-Jarvis) stuff and deleting the half-finished Krypton stuff worked fine for me...
Thank you so much for that, it solved my problem. Easy DROP DATABASE 'MyVideos107'; fixed that right up