MariaDB mysql server addon

  • Code
    1. mysql -u kodi -p
    2. Enter password:
    3. ERROR 1045 (28000): Access denied for user 'kodi'@'localhost' (using password: YES)

    Unfortunately, it works neither with user kodi nor with root.


    I have also noticed a problem with the PID file:

  • As written here MariaDB mysql server addon

    Quote

    Kodi user can't connect on localhost but only on real ip address. That's why you need to use -h parameter

    mysql -u kodi -p -h <real ip address of the server>


    Ignore PID file error.

    Gone...

  • hello,


    I´m having similar error, and can´t connect to DB


    PID is not writter in /var/run/mysqld directory...


    then I can´t login

    any idea?


    thanks

  • I personally newer had start problem.

    Check log file if you see anything useful there: /storage/.kodi/userdata/addon_data/service.mariadb/mysqld.log

    If not try to reinstall addon.

    Gone...

  • Hi vpeter,


    I reinstalled the addon and made a test with default passwords, I could access mariadb, then I changed the password in addon and I was unable to access again, so I reinstalled again the addon and tried to change the password from command line following some examples in internet, but password was not updated. Do you know how to change it?


    thanks


    PD: I've found the right command to change the psw, I did it from root user:


    ALTER USER kodi IDENTIFIED BY 'passwordHere';

    Edited once, last by were55 ().

  • I don't understand what is happening in your case but as soon password is changed from addons settings and get back to home menu mysql server is restarted and password is changed:

    LibreELEC.tv/mariadb.start at master · LibreELEC/LibreELEC.tv · GitHub


    Anyway, password is set in file /storage/.kodi/userdata/addon_data/service.mariadb/settings.xml.


    Changing password directly from mysql could have some side effects (like changing it to something else after restart). I newer even tested such

    scenario.

    Gone...

  • Hi,


    it's like were55 saying if you alter the passwords via addon settings you cannot connect. I did the same but before i first tried i altered the passwords without success, after removing the addon and readding it without altering the passwords it worked.



    Regards X23

  • I tested addon numerous times and it always worked as it should. But I only did in VMware workstation and not on real hardware. Maybe it works differently.


    If it doesn't work give me EXACT testing procedure from clean system without installed addon and it's settings.


    x23piracy: Are you the old friend?

    Gone...

  • vpeter oh it's you :) Yes i am that guy. I tried it on a RPI 4 4GB Version, everything was just installed from Scratch and i just adjusted both passwords for root and kodi user and rebooted the system and then tried to connect.


    In the log i could see that the user kodi was not allowed to connect so no wrong password, i just think it's the * for incoming connections to mariadb, maybe something needs to be updated too if the passwords is changed in guy, i don't know what you are doing in the background i haven't checked the scripts ;)


    Schreib mir mal per PN ;) Lange nix gehört...



    Regards X23

  • Hi vpeter


    Long time buntu & kodi user, first time LibreELEC, loving it so far


    Thanks so much for working on this, its hugely exciting to be able to use add-ons to extend the functionality of LibreELEC in this way.


    I've installed from scratch on a Pi 3 Model B+, installed the add-on for MariaSQL and experienced very similar behaviour to that described in previous posts.


    From install the autogenerated root password did not work (couldn't log-in to sql command line), the kodi autogenerated password did work.


    Manually changing the passwords in the app resulted in not being able to log in to sql with either account.


    Uninstalling the add-on and retrying had no effect, still no joy.


    On checking the logs each log-in attempt was met with a message saying that the account chosen wasn't allowed to connect from the machines IP.


    let me know if you need logs etc, happy to provide or test anything you want me to try.


    :)


    For reference removing the plug-in and running maria-sql via docker worked first time..........

  • For me everything works as usually but maybe I'm doing something wrong. And I only tested command line usage on same device - LibreELEC (official): 9.2.0 (Generic.x86_64) on VMware Workstaton 12.

    So tell me what I'm doing wrong so I can fix it.




    Gone...

  • Note: This appears to be a TMM issue, or an issue of my mis-understanding of NFO data. I can connect and the data is imported into the database from the library, so this post can be disregarded or deleted. Thanks for all the hard work on LibreElec, much appreciated.


    Update 12/27/19:


    I did a recovery on the unit for a fresh LibreElec install after finding that no movie data would load unless I was connected to the internet. There could be any number of add-on issues causing that, so with a fresh install I found that all my local NFO and Art would scan in without issue. I am now going to try reloading MariaDB and see what happens without any additional add-ons and standard skin. Fingers crossed.


    Okay well the issue seems to be that anytime the network (LAN) disconnects the database stops.


    If I unplug the network cable the DB stops.


    I understand that Mariadb is tied into the networking, but the database should not be entirely dependent upon an active network connection to run locally. Granted, that running MariaDB is primarily to share the library with other kodi installs on the network, but there are many other reasons to run an SQL database for Kodi.


    I solved the issue by simply blocking the LibreElec appliance from reaching the internet, and that allowed me to test and confirm that LibreElec will run the database independent of the internet. So that solved my problem, as I am building a system for a friend that has no internet access. Still I think that LibreElec should be able to run the database from a local drive, without an active network connection. My two cents anyway. Could be a configuration change is all that is needed, and I welcome any thoughts on the matter.


    I don't work with databases every day but I was able to get this up and running, and I can remote in and query the data, so I'm sure my other Kodi instances will connect.


    Only problem I see, is that when I look at the movie table, c08 and any of the art column / fields are pulling data from TMDB. i.e. <thumb aspect="poster">hxxp://image.tmdb.org/t/p/original/hYpSPhGvMZK9oeVtcdgPHZVMXUz.jpg</thumb>


    I use Tiny Media Manager, and pre-scrape all the art work and NFO files before loading the media into Kodi, so I want those local sources only.

    Prior to installing the database, I cleared my library and re-scanned using local sources only. All my NFO's and art are already on the drive.


    Why is it pulling from external sources?


    A little clarity would be good here. I can't see where the "default" setting is that is causing the database to fill in that data from internet sources.


    DigDog


    P.S. love the LibreElec running on Pi 4 just love it. Great work keeping the project up and running. There are little quirks here and there, but heck, that's what makes it so much fun to implement. Thanks to all involved. :):thumbup:

    Edited 4 times, last by digdog ().