Shared kodi database not working with LE12

  • Hello everyone!
    First of all my configuration:
    3 x86 PCs with LE11
    1 fire stick with latest version of kodi for android
    1 rasp Pi4 with tvhat and LE12
    1 HP 24/7 server with updated ubuntu server, mysql, tv tuner, 8 hdd, ip:192.168.1.xxx

    In the HP server there is the kodi library based on mysql and shared between the various kodi machines.
    So, I edited the advancedsettings.xml file

    <advancedsettings>
    <videodatabase>
    <type>mysql</type>
    <host>192.168.1.xxx</host>
    <port>3306</port>
    <user>xxxx</user>
    <pass>xxxx</pass>
    </videodatabase>
    <musicdatabase>
    <type>mysql</type>
    <host>192.168.1.xxx</host>
    <port>3306</port>
    <user>xxxx</user>
    <pass>xxxx</pass>
    </musicdatabase>
    <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
    </videolibrary>
    </advancedsettings>

    The three x86 machines with LE11 work perfectly with the shared library.
    Instead rasp pi4 and android kodi do not work or rather they see the old library from a year ago and do not synchronize the resume points and the watched states with the other PCs.
    If I update the three PCs to LE12 the shared library no longer works but if I put LE11 back then they start working correctly again.

    I wonder if the problem is on the latest version of kodi or on mysql. Is there any particular setting to set on mysql?
    Thanks for your patience.

  • For shared DB's to work you either need all devices on the same Kodi version, or you need to accept the DB's for K20 (LE11) and K21 (LE12) are not synchronised and manually keep things up-to-date by marking things watched and scraping new media as needed.

    I'd guess you test-updated to LE12 in the past which resulted in one of the devices migrating the K20 SQL DB tables to the K21 DB version. You haven't used K21 since so the data is stale, but it exists so (correctly) no migration takes place, and when you run the RPi4 it sees the K21 DB tables and uses them.

    To force DB migration again you need to drop the K21 database tables from the SQL server, see https://kodi.wiki/view/Databases for info on table versions, and then bump one device from K20 to K21 so the latest K20 data is migrated (again).

    To investigate the PC's not connecting, put Kodi into debug mode and bump to LE12 then run "pastekodi" and share the URL so we can see the debug log and perhaps spot what the issue is.

  • I'd guess you test-updated to LE12 in the past which resulted in one of the devices migrating the K20 SQL DB tables to the K21 DB version. You haven't used K21 since so the data is stale, but it exists so (correctly) no migration takes place, and when you run the RPi4 it sees the K21 DB tables and uses them.

    Hi, no, I have never tried an update before. I simply switched from LE9 to LE10 years ago without any problems and it immediately synchronized the database correctly.
    I am trying to follow your instructions now. Thanks for the instructions.

  • Hi. I connected the shared database via RazorSQL program and I see appearing:
    MyMusic72
    MyMusic82
    MyMusic83
    MyVideos116
    MyVideos119
    MyVideos121
    MyVideos131
    information_schema
    mysql
    performance_schema
    sys

    So, if I understood correctly, I have to delete everything and keep only MyMusic83 and MyVideos131, is that correct?
    Obviously I first made a backup of the current database via kodi.
    Thanks

  • Wrong. You want to keep the existing K20 table versions (which have the working LE11 database) and delete anything newer so that an upgrade from LE11 to LE12 on a working device triggers DB migration.