MariaDB mysql server addon

  • It is under Services.

    Darn... I know it's a Saturday morning, but I think I need to re-take my LibreELEC exams. :sleeping:

    Thanks for pointing in the right direction. I see the config now.

  • Okay, good news! The MariaDB is running off the RPi3B+ and the read performance off the SD card is not bad actually.

    I did a full export of the MySQL database and imported it successfully into MariaDB using MySQL Workbench (which was moaning about unsupported SQL versions, but whatever).

    The one bump in the road now is the "Recently added episodes" section for TV series, which has the all-known rotating wait cursor for about a full minute (will time it better next time) before those thumbs are shown. I have no problems with this on the PC when connecting to a proper MySQL server. All the other sections on the home screen load pretty much instantly. Also I now have a 45-second freeze when closing Kodi on the PC. No idea where that comes from.

    vpeter Can you enable a log file for the MariaDB server?

    There are the expected micro lags in handling database data when using a "big" PC or a "small" RPi device, but so far if you just blink once, you wouldn't know the difference when using the sql database on the RPi.

  • Okay, I'll dive into that. I have re-enabled all thumbs now, and after sitting idle for several minutes, Kodi on the Ubuntu PC (which is connected to the MariaDB on the RPi) now normally closes within a second again. Weird...

  • FYI, LibreELEC 8.95.002 on the RPi3B+ has the same (timeout?) problem with the "Recently added episodes" widget when connected to its own database server, so it's likely a MariaDB problem. I'll enable the log later on.

    I'm going install LibreELEC+MariaDB for the RPi3B+ onto a USB connected SSD for a permanent replacement of my current trusty Ubuntu 14.04 MySQL database server (:cry:). It has to be upgraded anyway, but the machine can also be used for new things to come.

  • I definitivelly dont recommend SD Card for DB, I had quite hard/weirdy testing times there myself :)

    I actually also jump from MySQL 5.1.73 to the MariaDB (but fresh installed DB content), and so far as user I didnt find any big troublemakers yet (something different from MySQL experience before)

    2x VIM3L, 3x X96 Air P3, 6x C2; 6x RPi2; 3x Win7 Kodi + vPeter's mariaDB plugin as Library DB

  • Right now, I wrote 3 LE 8.90.x images onto the USB-connected SSD, but every one has the same result: LE keeps deleting / creating / checking / resizing the storage partition and reboots after each reboot. It's Kingston 120GB ssd, on which Raspbian installs (and resizes) and runs fine. So I have no clue what LibreELEC keeps doing differently.

  • Try extract img from .gz, then fat partition from image, then files from fat (all that in 7zip). Create primary FAT32 partition on SD card, copy files there. Create EXT4 partition whenever you want /storage and points there .ini file..

    2x VIM3L, 3x X96 Air P3, 6x C2; 6x RPi2; 3x Win7 Kodi + vPeter's mariaDB plugin as Library DB

  • Thanks, I'll try that later on. Too many household chores to do at the moment. ||

    BTW, this is with an SSD, not an SD card. :)

  • vpeter

    Okay, for some odd reason the storage partition wasn't being resized, and the .please_resize_me stub file was also still present.

    I removed that file, and resized the partition manually with Gparted. LibreELEC boots normally now. Setting it up now for SQL server duties.

  • vpeter After lots of bl00d, trials, errors, sweat & tears, the LibreELEC - SSD - MariaDB combination is up and running. I ended up running the USB/SD Creator tool in Linux (because in Windows the SSD wasn't recognized by the tool), and then restored a full backup from my previously working SD card manually in Ubuntu, as LE's own restore function malfunctioned somehow. :dodgy:

    The "Recently added episodes" is still an issue, it bumps onto some sort of timeout. Other than that, it's time for stabilitytesting the coming days, weeks..

    Psst... It's now a USB/SD/SSD Creator tool 8o

  • Okay... So far two consecutive days 24/7 of problem-free MariaDB usage. :cool:

    I still need to investigate the Recently Added timeout via the Mariadb logfile, though.

    vpeter Are you planning on maintaining the add-on as well, as MariaDB updates are released? Perhaps only the bigger updates?

    Or will it be the "If it ain't broken, don't fix it" approach?

  • Well, I don't use mysql so will not even notice something is wrong. And bumping just because there is new version is useless anyway.

    Maybe better way would be that some advanced users would notify us "it's time to update" :D


  • I would raise a hand for "If it ain't broken, don't fix it" :-D (except case, when Kodi will be dependent on some brand new DB function, which is I think very unlikely) I am running Kodi's on MySQL 5.1.73 years, without hickup and I hope I will stay years on MariaDB the same way :-)

    2x VIM3L, 3x X96 Air P3, 6x C2; 6x RPi2; 3x Win7 Kodi + vPeter's mariaDB plugin as Library DB

  • I had a feeling, that would be the case. I just wondered, that's all. I still use(d) MySQL 5.5.62 on Ubuntu 14.04 myself *cough*.

    One thing about the passwords in the MariaDB addon settings:

    Will the current passwords simply be overwritten in the running database setup by newly entered passwords?

  • Well, if I will notice that package must be bumped I will do it. But if everything works fine why make a bump and get into trouble. It happened in multiple occasion at OE and LE.

    If you change password in settings then password is automatically set in database. If you have any other suggestion regarding how to be handled let me know.


  • But if everything works fine why make a bump and get into trouble

    It's all good, hehe.

    If you have any other suggestion regarding how to be handled let me know.

    No, I thought it may have been for an inital installation only. But if it also works when, for example, users forgot their passwords, then it's a plain and simple password update method. :thumbup:

  • vpeter Me again... :blush:

    The database is still doing fine, but I have some more questions:

    - Having enabled the log function and store it locally is not working. Or the log function is not working at all. No log file is created. Is it possible MariaDB is still using a my.cnf in a different location?

    # * Logging and Replication
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file = /var/log/mysql/mysql.log
    general_log_file = /storage/.kodi/temp/mariadb.log
    general_log = 1

    Any way I can verify the log is working? Obviously the default location is not working as there is no '/var/log/mysql' folder to begin with.

    - How do I start/stop/restart the mariadb service? I've tried several names but none seem to work. Otherwise I need to reboot the RPi to have the changes in the config file activated.

    - I have given the kodi user for the mariadb also 'kodi' (call me lazy), but apparently I cannot connect via SSH with those full credentials.

    When I use mysql -u kodi -p and enter the password, I get an ERROR 1045 (28000): Access denied for user 'kodi' localhost (using password: YES).

    When I use mysql -u kodi without typing the password but just go ENTER, I get logged into the MariaDB server.

    It's like an opposite situation.

    Is this a quirky bug when having the same values for user and password? When using 'root' (which has a unique password), it have to type the password to log in normally.