MYSQL Plugin - syncing watched/resume status between multiple Kodi clients.

  • I would be really grateful for some advice in getting my Raspberry Pi's (running Libreelec) to sync their resume/watched status, via a central database.


    I installed the OMV MYSQL plugin.


    I then went into the plugin settings and turned on and Enabled the plugin and Enabled networking.


    I left port as 3306 and changed bind address to 0.0.0.0.


    I then created a file called "advancedsettings.xml" (on my laptop)and put the following into it:


    <advancedsettings>
    <videodatabase>
    <type>mysql</type>
    <host>192.168.1.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
    </videodatabase>
    <musicdatabase>
    <type>mysql</type>
    <host>192.168.1.1</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
    </musicdatabase>
    <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
    </videolibrary>
    </advancedsettings>


    I then copied this file into the userdata folder on my two Rpis and then added the same video source, from my server, to each Pi.


    I then rebooted the server and both Pis.


    When I watch a video from the server, I am not able to resume from the same Pi or the other one - basically, the resume/watched status does not appear to be saved anywhere.


    What do you guys think I am doing wrong?

  • hmm, 0.0.0.0 should route to all IPs assigned to the machine, so if it had say an ipv6 address you could reach it there at port 3306 as well.


    Though if I recall MySQL default configuration is to listen on loopback only... What was the value of bind address before you changed it?


    Are you sure the 'kodi' user has appropriate permissions for the database??

  • OK I think 0.0.0.0 should be correct. You did good there.


    This is a bit of a sticky situation because I'm not familiar with the OMV mysql plugin- I use trakt.tv personally to keep all my tv/movies "scrobbled."



    Code
    mysql -u root -p mysql
    update db set Host='xxx.xxx.xx.xx' where Db='kodi';
    update user set Host='xxx.xxx.xx.xx' where user='kodi';


    https://www.cyberciti.biz/tips…ysql-database-server.html


    Also ensure the port is not blocked by OMV firewall.

  • Thank you so much, drinks2go!


    You were completely right - I searched for mysql and Kodi Rights and it seems that I needed to do the following:



    Code
    $mysql -u root
    $CREATE USER 'kodi' IDENTIFIED BY 'kodi';
    $GRANT ALL ON *.* TO 'kodi';
    $flush privileges;
    $\q

    Everything works perfectly now. Thanks again - I really owe you one.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!