LibreELEC doesn't connect to mySQL anymore

  • Dear all,

    could you please help me and look into my problem?

    LibreELEC is not connecting to MySQL anymore. Yesterday I upgraded LibreELEC with GUI option to 8.2.5 and since then it's no longer working.

    'Wait for network before starting Kodi' is enabled.

    Here is the pastebin link http://ix.io/1xtq.

    I saw that the log shows error 'Can't connect to MySQL server on '192.168.0.234'', but when I SSH to LibreELEC and execute 'ping 192.168.0.234' everything looks fine. LibreELEC is able to connect to 192.168.0.234.

    Best regards

    kryptonite

    Edited once, last by kryptonite (January 4, 2019 at 10:14 AM).

  • Yesterday I upgraded LibreELEC with GUI option to 8.2.5 and since then it's no longer working.

    What was the previous version? It's possible that your user 'kodi' on the MySQL server does not have sufficient rights to create new databases and/or tables on the server. Perhaps you previously forgot to run the GRANT ALL ON *.* TO 'kodi'; query when setting up the MySQL database. Or something changed in the time between.

  • I think the previous version was already 8.x.x but to be honest I am not sure. Just checked if there is a newer one and installed it. Didn't do an update since the initial installation (I think 2 years ago).

    Since I only did a LibreELEC update and nothing else, I don't think it is related to MySQL server rights. Attached screenshot shows rights of user 'kodi' in MySQL.

  • Any Kodi build with the same major (stable) version will not change, database-wise. Unless there is a catastrophic failure going on.

    During Alpha, Beta or RC releases, that's another matter. Kodi 18 RC4 also had database upgrade.

    What sort of contraption are you using for running your MySQL server? And which version is MySQL / MariaDB ?

  • I am running a QNAP NAS with installed addon phpMyAdmin (Version information: 4.8.2, latest stable version: 4.8.4):

    Server: Localhost via UNIX socket

    Server type: MariaDB

    Server connection: SSL is not being used Documentation

    Server version: 5.5.57-MariaDB - MariaDB Server

    Protocol version: 10

    Do I have a mismatch in versions of LibreELEC and MySQL?

    How can I check which versions of Kodi/LibreELEC and MySQL are compatible?


    Documentation

  • Your log clearly say Can't connect to MySQL server on. Which means there is no connection to your sql server. Maybe IP was changed?

    If you have ssh console try restarting kodi to see if it is really network timeout problem

    Code
    systemctl restart kodi
  • Code
    systemctl restart kodi

    Executing this command in ssh console works. Afterwards the library is completely available again.

    What does that mean now? As mentioned in my first post, 'Wait for network before starting Kodi' is enabled. Is LibreELEC not waiting long enough?

    I just saw that after wait for network there is now a 'Maximum Wait Time'. It was set to 10 seconds. I changed it now to 30 seconds and it seems, now it's working. I think this max wait time option was not there in older LibreELEC versions (or I just didn't saw/recognized it).

    Anyways, thanks for the great support. Very happy to have it back working :)