Jump to content
hiddentalnt

MariaDB and Kodi

11 posts in this topic Last Reply

Recommended Posts

Hi all,

 

I seem to have hit a wall and cant find where the issue lies. I have installed Needo's MariaDB successfully and added kodi as a user.  Using MySQL Workbench I can connect and verify the user exists.  I have tried adding the default advancedsettings.xml file.  However, when I attempt to add a new source everything seems to go well, but no database is created in MaraiDB.  Any advice is much appreciated.  I can provide any logs or screenshots that may be of use.

 

Share this post


Link to post

You have to edit advancedsettings.xml to point to the sql db.  The default one will not work.  Check out the Lodi website for details

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

Squid,

Sorry, I guess that was a little confusing on my part. By default, I meant the structure on Jodi's website, but with my server IP address.

I didn't change any config settings to MarieDB and I've tried using both windows and Android versions of Kodi to add sources. And for the hell of it, last night I replaced needo MariaDB with the Linuxserver version.

 

Thanks

HT

 

Sent from my SM-G935V using Tapatalk

 

 

Share this post


Link to post

What guide did you follow?

 

Also, did you create a user for Kodi to use and grant it access to everything?

 

Post your advancedsettings.xml (feel free to censor your user/pass combo).

Share this post


Link to post

Wasn't able to find a guide that was really up to date.  But here are the steps that I took:

 

1) Add LinuxServer/MariaDB docker

To do this I used the default settings and ports while adding password in the advanced parameters.

 

2) Add user to MariaDB

Log in using the servers IP and the port listed in the docker.  No issues logging in, then ran the commands:

 

CREATE USER 'kodi' IDENTIFIED BY 'kodi'

GRANT ALL ON *.* TO 'kodi'

 

I was able to verify using MySQL workspace that the user does exist.

 

3) Install new clean version of Kodi

I plan on using headless, but wasn't fully understanding how to add sources, perform library scans on it.  I would endevour this on another day (or just copy sources over once mysql is up and running)

 

4) Add Advancedsettings.xml to userdata

<advancedsettings>

  <videodatabase>

    <type>mysql</type>

    <host>192.168.1.120</host>

    <port>3306</port>

    <user>kodi</user>

    <pass>kodi</pass>

  </videodatabase>

  <musicdatabase>

    <type>mysql</type>

    <host>192.168.1.120</host>

    <port>3306</port>

    <user>kodi</user>

    <pass>kodi</pass>

  </musicdatabase>

  <videolibrary>

    <importwatchedstate>true</importwatchedstate>

    <importresumepoint>true</importresumepoint>

  </videolibrary>

</advancedsettings>

 

5) Finally, once restarting Kodi, I went in and added a small source to test it.  After a quick scan, nothing had been done in MariaDB, and no new connections had been made to the server

 

Hope that gives a good overview of what I used

Share this post


Link to post

 

 

4) Add Advancedsettings.xml to userdata

 

Only thing that strikes me as being incorrect is above.  Is that a typo?  the filename should be advancedsettings.xml not Advancedsettings.xml Along with the fact that the commands you listed as entering into MySQL did NOT end in a ;

 

Share this post


Link to post

Thanks Squid.  Not sure where the issue was but started from scratch again and seems to be working, i'm not sure where the typo was. Now to figure out why unraid keeps buffering!

 

Sent from my SM-G935V using Tapatalk

 

 

Share this post


Link to post

Also I want to use mariadb with my kodi, but all guides are using mysql. What is the correct commando to use mariadb instead of mysql in the lines? I mean, 

  • mysql -u root -p

doesn't work...

 

/Söder

 

Share this post


Link to post

Personally, I think its easiest to connect to the SQL db via something like MySQL workbench on a windows box and then run the appropriate commands to create user kodi, and grant all to kodi from it.  No problems connecting to MariaDB via MySQL workbench.

Share this post


Link to post
On 2/15/2018 at 7:53 AM, soder said:

Also I want to use mariadb with my kodi, but all guides are using mysql. What is the correct commando to use mariadb instead of mysql in the lines? I mean, 

  • mysql -u root -p

doesn't work...

 

/Söder

 

You have to log into the MariaDB docker’s terminal. You cannot type this straight from the unRAID console.

 

unfortunately I can’t remember the actual command to do this. I use a custom script for this.

Edited by hernandito

Share this post


Link to post
2 hours ago, hernandito said:

You have to log into the MariaDB docker’s terminal. You cannot type this straight from the unRAID console.

 

unfortunately I can’t remember the actual command to do this. I use a custom script for this.

docker exec -it mariadb bash

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.