installing mariaDB to share a movie database in a network

  • Hi, I need some help for my small project.

    I have 3 PIs running in my house and my goal is to share only one movie database through the network.

    I've started to use this tutorial MySQL/Setting up MySQL - Official Kodi Wiki but apparantly libreelec is a read only system.

    Therefore i couldn't install mariaDB via putty.

    Then I found out that i can install mariaDB directly at libreelec, but after that point I have no clue what I have to do next. I can't find any config files and I have no clue what I have to set up on the client PIs.

    In a nutshell: I need an easy tutorial from scratch.

    I would be glad, if someone is able to help me. :)

  • I have a question regarding the advancedsettings.xml

    Do I have to type mariaDB instead of mysql under "type"?

    Do i have to change the user and password? In libreelec under the MariaDB Server app there is a root and kodi user with a password for each user. Do I have to take those setting?

  • I'm starting to give up after three days, serveral fresh installs and a lot of attempts, I'm not able to get it running.

    I'm even at the point where I'm able to import my movies and I can see a finished database, but after a reboot, everything is gone.

    I have no clue, what i could do else...

  • Random guess. Have you enabled "wait for network" in Network settings? .. LE boots fast so Kodi will often start before the network stack is up, which means the SQL DB is not accessible when Kodi attempts to connect with it. No DB = "all my movies are gone" reports from users.

    actually it was exactly my problem ;)

  • I have some really strange behavour today:

    It doesn't work again.

    After a reboot, the preview section has the movie covers (last seen, unviewed movies etc.), but if i click on "movies" to see all my database, it's all empty.

    If I change the IP to a wrong one and reboot, the preview section is gone. Therefore it connects to the database with the right IP, but doesn't show everything.

    Any ideas?

  • I have turned off "Widgets" which was the problem.

    The database on the server client runs fine now!

    My last problem is to set up the client:

    I've copied the advancedsettings.xml, sources.xml, Textures13.db, and the whole Thumbnails folder to the right folders.

    Everything shows up correctly on the client, but I can't connect to the hard drives of the raspberry server.

    In the sources.xml of the server:

    Code
            <source>
                <name>Filme 2</name>
                <path pathversion="1">/media/Extern 2/Filme/</path>
                <allowsharing>true</allowsharing>
            </source>

    I have problems with changing the path for the client:

    Code
            <source>
                <name>Filme 2</name>
                <path pathversion="1">smb://root:[email protected]/media/Extern 2/Filme/</path>
                <allowsharing>true</allowsharing>
            </source>

    What do I wrong?

  • You need to connect your server to the files as if you are connecting to the server (itself) as well. And not connect to the files as local files. Otherwise the wrong paths will be entered into Kodi's video database.

    Do I have to change the sources.xml on the server or is it already too late and my whole database is useless?

  • If you already scraped your entire library using local sources, then yes, the database is kinda useless. You could fix things with a bandaid of sorts on the local/server machine and play with pathsubstitution in your advancedsettings.xml file, but I would set up things correctly and scrape the media collection properly.

    It's best to also delete the Thumbs folder and the Textures13.db file, and also drop the current MyVideos116 database, as currently there will be thumbs and references to obsolete files once you use the SMB source(s).

  • So you are using RPi to store the files? Is it powerful enough for such a task?

    1) Yes, but it recommended to either usb a SSD for the /storage partition (or have LE boot entirely from the SSD). Running a database on an SDcard will sooner or later wreck the SDcard.

    2) The RPi4, with gigabit and USB3.0 has enough grunt to handle Kodi databases. Even if that database is stored on a proper SDcard.

  • If you already scraped your entire library using local sources, then yes, the database is kinda useless. You could fix things with a bandaid of sorts on the local/server machine and play with pathsubstitution in your advancedsettings.xml file, but I would set up things correctly and scrape the media collection properly.

    It's best to also delete the Thumbs folder and the Textures13.db file, and also drop the current MyVideos116 database, as currently there will be thumbs and references to obsolete files once you use the SMB source(s).

    I've deleted all files you mentioned, but after a reboot the database is still there and is starting to load all images again from the internet.

    Anything else to delete?

  • I've deleted all files you mentioned, but after a reboot the database is still ther

    A MySQL (or MariaDB) database is not your typical computer file. You will need a database tool MySQL Workbench or PHPMyAdmin to connect to your LibreELEC database server, and subsequently remove the MyVideos database using either an typed SQL statement such as DROP MyVideos116; or using the GUI of one of the 2 tools I just mentioned to nuke that database.

    Perhaps you may need to do a bit of homework in what MySQL can do, and how.

  • Here the MySQL database is running on the PC file server that is sharing my media files. The Ubuntu OS runs on a simple SSD via an external USB/SATA cable, as so does the MySQL server. All the internal SATA ports are for HDDs (media stuff, backups,etc). I don't think I have that many media files considering what others are claiming to have. It serves videos and music files for me.