Upgrade to Kodi v19 (matrix) problems with MySQL

It seems that the mariadb database got damaged when upgrading. The same effect happened then on win and android kodi (not able to set content and crash when playing any file). The db got upgraded with osmc tho. It did display an upgrade page on the first restart, and I did get MyVideos119.
Fortunately I have all watched states backed up with trakt.tv so I just created a new database and now it works.

Symptoms:

  1. After I “set content” of my sources, it just does not get saved. All other settings seem to stay. The scan also never starts.

  2. All video files I tried to play (via file section) crashes the system (sad face). I’m using a NFS share.

The skin changing problem got solved with just trying a lot of times. After the 20. try of confirming the change skin dialogue it suddenly stayed. This issue is very strange.

Which of the 3 did you first upgraded to v19?
You first should only change one and then finish the upgrade there.
Also if there is an issue after upgrade you just can delete the new database and next restart will again migrate from the previous one.
But if you have done the migration on Win/Android already in the past then you will have a discrepancy between the watch status

I did the upgrade with osmc. The other 2 I barely use and was just for testing after there were indications that it’s caused by the db.

Then you should be able to just delete all v19 versions of the databases (Databases - Official Kodi Wiki) and reboot one of the v19 machine (while the others are shutdown) that would do another upgrade of the db. If the upgrade fails you then should see a failure in the log file.

Revert to old database and tried upgrade again, it failed again:

INFO : MYSQL: Connected to version 10.4.18-MariaDB-1:10.4.18+maria~bionic-log
ERROR : Unable to open database: MyVideos119 [1049](Unknown database ‘MyVideos119’)
ERROR : Unable to open database: MyVideos118 [1049](Unknown database ‘MyVideos118’)
ERROR : Unable to open database: MyVideos117 [1049](Unknown database ‘MyVideos117’)
INFO : Old database found - updating from version 116 to 119
ERROR : SQL: Can’t copy schema for table ‘actor’
Error: 1050
ERROR : Unable to copy old database MyVideos116 to new version MyVideos119

Full logs: https://paste.osmc.tv/erazosexeg

This is quite strange as it is error for table exists. My guess is you have not shutdown all clients and there is a table lock.
Suggest to first shutdown all clients. Remove the database (restart mysql as a safety measurement) and then only power up the OSMC device first

osmc was the only client running anyway. this is what I did twice:

stop mariadb, delete MyVideos119, start mariadb, reboot Vero.

I did a third try now with plugged out power of Vero as first thing. Same thing happens.

I also did a “rm actor*” now for testing, same thing happens with next table “art”

Where did you do that?

in the MyVideos116 folder, after removing the MyVideos119

I don’t think that should be the solution.
I would more look like what happens on MyVideos119. e.g. now that you have an issue with “art” check if in MyVideos119 you have a table art or not.
Also you could try to enable component specific logging for mysql.

As this is a problem that only impacts you. Maybe we should take this to a separate thread.

Was just for testing if there is any problem with the table actor, but it seems not.
MyVideos116 has art.frm and art.idb (along with all other tables), MyVideos119 has only 2 files total: art.idb and db.opt

My setup is pretty basic except the use of a network database instead of a local one, and it’s running like this for quite a while (all previos upgrades were never a problem). Would surprise me if I am the only one. Where would you suggest to open a seperate thread, “help-and-support/vero-4k/” ?

Let me move the thread for you.

There is an issue with Discourse which doesn’t allow me to move the posts to a new thread. Anyway my next suggestion would be to not have the OSMC box doing the update but the Windows box to figure out if it is a OSMC specific issue or not.

Just tried that now :slight_smile: same error happens. Could not find anything related on a quick search on the kodi.tv forums. Maybe it’s really just me that is affected. We can leave it as I can run with a new created db and resync watched status with trakt (as soon as I’m able to install it :slight_smile: )

Update: found something with same symptoms: shared library (mariadb) problem after migrating to matrix but running mysql_upgrade did not help, same error comes up.

Update2: definitely a database problem. In case someone stumbles on the same problem and mysql_upgrade alone does not fix it, this is what I did to get it working again using a new mariadb docker (warning, I’m a noob):
on old mariadb (console inside docker):
mysqldump --all-databases > /config/sql_file.sql
copy file to a new mariadb installation
on new mariadb (console inside docker):
mysql -u root -p < /config/sql_file.sql
don’t know if these steps are also nessesairy:
mysql_upgrade -u root -p
mysql -u root -p
GRANT ALL ON *.* TO 'kodi';
flush privileges;

Thanks for the update. I moved your posts to a new Thread as I believe we can keep this information more clear for future updaters.

1 Like

Actually, I just installed and ran kodi (v19 Matrix) on my S8 android phone. My problem is that when I added a new video source and setup its settings, those changes didn’t get saved. I tried several times to “Set Content” for the folder, clicked “OK”, then looked at the settings again. The change didn’t happen.

I don’t know how this would do on my MySQL (I have that set up for my osmc boxes, but am wary to allow kodi on my phone access to the server). Could this be a java permissions problem? The files are all on the internal flash drive.

Just wanted to mention this. I was going to post about this problem myself.

ken