Win getting kodi to work with MYSQL
#1
Hi

I have tried alot and looking on the wiki for how to get the kodi v. 14.2 to work with MYSQL. But no matter what i do i can´t figure out where the problem is. so i´m gonna paste my info here so I hope you have some solutions ;-)

the advancedsettings.xml file looks like this
----------------------------------------------------------------------------------------------------------------
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.169.40.118</host>
<port>3306</port>
<user>kodi</user>
<pass>xxxxxxxx</pass>
<name>kodi_video<name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.169.40.118</host>
<port>3306</port>
<user>kodi</user>
<pass>xxxxxxxx</pass>
<name>kodi_music<name>
</musicdatabase>

</advancedsettings>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sources.xml file
-----------------------------------------------------------------------------------------------------------------------
<sources>
<programs>
<default> pathversion="1"></default>
</programs>
<video>
<default> pathversion="1"></default>
<source>
<name>TV Shows</name>
<path pathversion="1">smb://NAS/Serier/</path>
</source>
<source>
<name>Movies</name>
<path pathversion="1">smb://NAS/film/</path>
</source>
<name>Main Music Collection</name>
<path pathversion="1">smb://NAS/music/</path>

</source>
</video>
<Music>
<source>
<name>Main Music Collection</name>
<path pathversion="1">smb://NAS/music/</path>
</Music>
<allowsharing>true</allowsharing>
</sources>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

see this is where i don´t understand it. I have put these two files into the right folder under my user. C:\Users\Jann\AppData\Roaming\Kodi\userdata

but the mysql database doesn´t seem to make a schema or tables under the Kodi Table, isn´t it suppose to do that?

The user i have made on the mysql is kodi with the same password as in the advancedsettings.xml file

I have also made a USER on the NAS (synology) with the exact same credentials and password.

To me it seems like there is no link between the 2.... like the kodi won´t look into the mysql?

I have confirmed this by logging into the mysql and seen the kodi table (none what so ever). there is nothing when i look into kodi itself it doesn´t refer to the sources. Just seems like a brand new kodi install.

any suggestions?
Reply
#2
Quote:<name>kodi_video<name>
Should be
Code:
<name>kodi_video</name>
You're missing the slash in the closing <name> tags but database name isn't needed unless you are trying to set up multiple users. Best to delete the name lines altogether
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#3
I also had problems using smb://??/movies ended up using the IP address in the line.
Reply
#4
(2015-07-23, 06:41)MrLobster Wrote: I also had problems using smb://??/movies ended up using the IP address in the line.

i think that is because you don´t have dns setup. you can make sure by typing \\NAS in my case ;-) but it is from my windows machine so i know it worked but maybe better to do on raspberry pie 2 and so on. I´m getting it to work for my multiroom project where i use >RP2 as kodi boxes linked up to the mysql ;-)
Reply
#5
(2015-07-22, 22:34)Dilligaf Wrote:
Quote:<name>kodi_video<name>
Should be
Code:
<name>kodi_video</name>
You're missing the slash in the closing <name> tags but database name isn't needed unless you are trying to set up multiple users. Best to delete the name lines altogether

so your suggesting that the file looks like this?

the advancedsettings.xml file looks like this
----------------------------------------------------------------------------------------------------------------
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.169.40.118</host>
<port>3306</port>
<user>kodi</user>
<pass>xxxxxxxx</pass>
<name>video</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.169.40.118</host>
<port>3306</port>
<user>kodi</user>
<pass>xxxxxxxx</pass>
<name>music</name>
</musicdatabase>

</advancedsettings>
-----------------------------------------------------------------------------------------------------------
Reply
#6
http://kodi.wiki/view/MySQL

I suggest you go back through and double check everything. It works. Just by the use of the <name> tag, you clearly didn't understand step six of the link above where it said "not required". Verify you have done everything correct, and if still not working then maybe you will get more focused answers. Wink
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply
#7
Wishkeeper,

Remove the <name> tags from your advancedsettings.xml. Kodi should create the tables in the MySQL database, as long as the user and password you are providing have those permissions in the database.

I have my mySQL db in my NAS (Synology) and multiple Kodi clients (Windows 8.1, Windows 10, OS X) connect to it correctly.

My advancedsettings.xml looks like this:

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.199.141</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.199.141</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>

     <videolibrary>
          <importwatchedstate>true</importwatchedstate>
     </videolibrary>
</advancedsettings>

And my sources.xml looks like this:

Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>BaLi HD Movies 3</name>
            <path pathversion="1">smb://BALIDS/HD Movies 3/BaLi HD Movies 3/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>BaLi Series</name>
            <path pathversion="1">smb://BALIDS/TV Shows/BaLi TV Shows/BaLi Series/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>HD Movies</name>
            <path pathversion="1">smb://BALIDS/HD Movies/HD Movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>HD</name>
            <path pathversion="1">smb://BALIDS/HD Movies 2/HD/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>BaLi HD Movies 5</name>
            <path pathversion="1">smb://BALIDS/HD Movies 5/BaLi HD Movies 5/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>BaLi HD Movies 6</name>
            <path pathversion="1">smb://BALIDS/HD Movies 6/BaLi HD Movies 6/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>BaLi HD Movies 7</name>
            <path pathversion="1">smb://BALIDS/HD Movies 7/BaLi HD Movies 7/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>BaLi HD Movies 8</name>
            <path pathversion="1">smb://BALIDS/HD Movies 8/BaLi HD Movies 8/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>SD</name>
            <path pathversion="1">smb://BALIDS/SD Movies/SD/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>SD2</name>
            <path pathversion="1">smb://BALIDS/SD Movies/SD Spanish/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Music Vids</name>
            <path pathversion="1">smb://BALIDS/Bali Music/BaLi Music Vids/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Classic Disney</name>
            <path pathversion="1">smb://BALIDS/SD Movies/Classic Disney/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>Adult Movies</name>
            <path pathversion="1">smb://BALIDS/AM/AM/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">X:\BaLi Music Collection\Music\</path>
            <allowsharing>true</allowsharing>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

Both of the files are located, as you stated, in the userdata folder.

Regards,

Bart
Reply
#8
Is MySQL on the nas listening on the network? Some MySQL setups listen by default only on localhost.

Oh and of course debug log (wiki)
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
(2015-07-24, 15:31)Redwingsfansfc Wrote: http://kodi.wiki/view/MySQL

I suggest you go back through and double check everything. It works. Just by the use of the <name> tag, you clearly didn't understand step six of the link above where it said "not required". Verify you have done everything correct, and if still not working then maybe you will get more focused answers. Wink

Hi i took away the name but all that was really missing was the "/" can see it now communicating with the sql it has made 3 databases. so far so good. but still having trouble as the kodi won´t show or have a default libriary within music, movies and so on.

found out what the error was. and the error was also in the source.xml file besides the name tag

the music is working as intended just to get the other 2 working as well.If i might say the wikii isn´t that great on this. But also my 1. time setting it up.
Reply
#10
The wiki instructions work fine if you follow them exactly.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply

Logout Mark Read Team Forum Stats Members Help
getting kodi to work with MYSQL0