MariaDB mysql server addon

  • Yeah, not sure why it seems to have changed the password on its own. Had the addon installed and watched some stuff then went to sleep. The Pi stays on all the time. When I came back the next evening to watch another show, everything was gone. The password had somehow changed. Unless it auto-updated, I'm not sure what happened.


    Thanks for all your work on this addon! It makes having a SQL database on LibreElec much easier.

  • I have auto-updates enabled for add-ons so maybe it just updated itself? Glad the changed password thing is fixed. Is that live or just current tested?

  • Last I checked, the day after my last post, there wasn't an update pushed so I guess I'll wait until the next update to see if it's fixed. Thanks for all your work, sir!

  • Hi. Thanks for creating the add-on!

    A couple of things - I've found that the default passwords wouldn't change for me by changing in the app; had to do it via SSH.

    My other issue is an error I keep getting.

    I'm running libreelec on rpi3b+ connected to my TV and my network drive. My mysql database is on this machine.

    Everything is hunky dory when connecting from other machines. What doesn't work is trying to connect from the RPI itself to the mysql server.

    I've tried setting server as localhost in advanced settings, but I am getting an issue ((Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)) when trying to 'connect' from the RPi.

    Some googling suggests (reading between lines) that this is because at the time of the connection to the server, Kodi has not yet initialised the mysql server.

    Anybody with a similar problem?

  • hello there,

    is their any kind of manual for this?
    how do i set this up?

    i have installed the addon and messed around with advancedsettings.xml and so on but my kodi does not scan for content unfortunately

    • Official Post

    is their any kind of manual for this?

    Not really. :P

    It is a setup that is 'as-minimal-as-possible'. Installing should create all default settings, databases, tables, views and triggers for both the video and the music database. If you restart LibreELEC, you can check the log file if you have correctly connected to the MySQL MariaDB server via the parameters in the advancedsettings.xml file. Go into the settings of the MariaDB Server add-on to change the initially created user/password combination.

  • okay, my log looks like that:

    Code
    T:1807721328   ERROR: Unable to open database: MyVideos116

    and i noticed that my device is NOT listening on port 3306?

    Also another question; i have to create the advancedsettings.xml by myself, the addon does not do that, does it?

  • Quote

    ERROR: Unable to open database: MyVideos116 [1130](Host 'pi-wohnzimmer.fritz.box' is not allowed to connect to this MariaDB server)

    2019-04-04 18:06:16.926 T:1807721328 ERROR: Unable to create new database

    2019-04-04 18:06:16.934 T:1807721328 NOTICE: Running database version TV32

    Thats what it says now. I tried both, root and kodi user.

    • Official Post

    I don't have a RPi with the MariaDB server running here at the moment.

    But please provide a link to the full kodi.log file, so we can perhaps see if something else needs adjusting.

    Posting just one error is only an indicator, bugs/errors can start at any moment.

    Please provide a full debug log.

    How to post a log (wiki)

    1. Enable debugging in Settings>System Settings>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. Generate a log URL (do not post/upload logs to the forum)

    use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link
  • Open MariaDB addon settings and change password for user kodi (kodi in this example).

    Then in advancedsettings.xml use real IP address and not 127.0.0.1 like

    Code
    <videodatabase>
      <type>mysql</type>
      <host>192.168.1.2</host>
      <port>3306</port>
      <user>kodi</user>
      <pass>kodi</pass>
    </videodatabase>
    • Official Post
    Quote

    Host 'pi-wohnzimmer.fritz.box' is not allowed to connect to this MariaDB server

    I thought that outside access to the MariaDB Server was granted by default?

    You could double-check by accessing the mysql tables via a SSH session:

    Code
    mysql -u kodi -p
    USE mysql;
    SELECT Host,User FROM user WHERE User="kodi"; 
    +------+------+
    | Host | User |
    +------+------+
    | %    | kodi |
    +------+------+
    1 row in set (0.00 sec)

    Although I do prefer to use IP addresses only myself instead of hostnames.