Help with Mysql and Kodi setup

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
rgc121
New here
Posts: 8
Joined: Thu Mar 02, 2017 9:50 pm

Re: Help with Mysql and Kodi setup

Post by rgc121 »

Well I have tried again with a new install of Kodi on a raspberry pi. The advancedsettings .xml file has "kodi" username and "kodi" password. I import the movie files from the Qnap into the library ,then export them singularly as instructed on kodi website but there appears to be no connection between the pi and mysql.. In phpmyadmin I have user "kodi" and password"kodi"but it just doesnt work. I am completely lost now I'm afraid. phpmyadmin logs me in as root automatically and user Kodi is there but I don't know how to change it . There appears no method to remove it or change it
User avatar
Trexx
Ask me anything
Posts: 5388
Joined: Sat Oct 01, 2011 7:50 am
Location: Minnesota

Re: Help with Mysql and Kodi setup

Post by Trexx »

I would recommend posting a picture from phpMyAdmin showing your accounts. Typically if you can access KODI Db from 1 external device (rasberry pi, etc. ) you should be able to access from any of them.
Paul

Model: TS-877-1600 FW: 4.5.3.x
QTS (SSD): [RAID-1] 2 x 1TB WD Blue m.2's
Data (HDD): [RAID-5] 6 x 3TB HGST DeskStar
VMs (SSD): [RAID-1] 2 x1TB SK Hynix Gold
Ext. (HDD): TR-004 [Raid-5] 4 x 4TB HGST Ultastor
RAM: Kingston HyperX Fury 64GB DDR4-2666
UPS: CP AVR1350

Model:TVS-673 32GB & TS-228a Offline[/color]
-----------------------------------------------------------------------------------------------------------------------------------------
2018 Plex NAS Compatibility Guide | QNAP Plex FAQ | Moogle's QNAP Faq
rgc121
New here
Posts: 8
Joined: Thu Mar 02, 2017 9:50 pm

Re: Help with Mysql and Kodi setup

Post by rgc121 »

Thanks for all the help.Finally got it working but not sure how. Suddenly the database appeared and have been able to populate it.
All help much appreciated .
ensignvorik
Easy as a breeze
Posts: 365
Joined: Sat Jul 14, 2012 8:24 pm

Re: Help with Mysql and Kodi setup

Post by ensignvorik »

Glad you got it working. Bit perplexed as to why you're doing importing and exporting! But if it's working you might want to just leave it as is for now. If it breaks, this is how I do it. It might be some of these (like the passwords file) might not be needed anymore. I've had this setup for about 5 years and just always copied and pasted it across whenever I do a new Kodi build.

Not sure what version you've got on your Pi, I'm using Librelec, and I have the following files in my userdata folder and Kodi just immediately fills the DB (or populates itself from the DB). You might just have to edit your media sources in Kodi to tell it that movies/tv shows are in the folders in question.

Obviously make changes to point to the correct IP address.ports/user accounts on your QNAP

advancedsettings.xml

Code: Select all

<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.3</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase> 
    <musicdatabase>
        <type>mysql</type>
        <host>192.168.0.3</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>
	<pathsubstitution>
     <substitute>
      <from>special://masterprofile/Thumbnails/</from>
      <to>smb://192.168.0.3/Multimedia/Thumbnails/</to>
     </substitute>
    </pathsubstitution>
</advancedsettings>
sources.xml (note I'm using smb here for simplicity, you can use AFP or NFS also)

Code: Select all

<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Videos</name>
            <path pathversion="1">/storage/videos/</path>
        </source>
        <source>
            <name>TV Shows</name>
            <path pathversion="1">smb://192.168.0.3/Multimedia/tv series/</path>
        </source>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://192.168.0.3/Multimedia/movies/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">smb://192.168.0.3/Multimedia/Music/</path>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
        <source>
            <name>Pictures</name>
            <path pathversion="1">/storage/pictures/</path>
        </source>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>ensignvorik</name>
            <path pathversion="1">smb://192.168.0.3/ensignvorik/</path>
        </source>
        <source>
            <name>downloads</name>
            <path pathversion="1">/storage/downloads/</path>
        </source>
        <source>
            <name>backup</name>
            <path pathversion="1">/storage/backup/</path>
        </source>
    </files>
</sources>
passwords.xml (change username:password to a user/password that resides on your QNAP and that can access all of the shares listed above)

Code: Select all

<passwords>
    <path>
        <from pathversion="1">smb://192.168.0.3/</from>
        <to pathversion="1">smb://username:password@192.168.0.3/</to>
    </path>
</passwords>
Unless I'm being blind, I can't find the setting to change what kind of QNAP I have on my profile. I now own a TS-253A
AlchimistaKumo
New here
Posts: 3
Joined: Tue Jan 31, 2017 6:11 am

Re: Help with Mysql and Kodi setup

Post by AlchimistaKumo »

good day, i have a problem with qnap kodi 17.1 and mysql.
i hope to be in the right place :D .
i ve installed mysql and phpmyadmin and i ve created a db.
i ve change advantsettings on my smartphone kodi and i've seen that was created myvideo107 and mymusic60. and works.
after i ve do the advantsettings change in the qnap kodi, kodi start but dont refresh the libraries and dont set the contents type. i set it on the source but dont apply the change.
Someone has an idea of ​​what happened?
Thankyou to all
ensignvorik
Easy as a breeze
Posts: 365
Joined: Sat Jul 14, 2012 8:24 pm

Re: Help with Mysql and Kodi setup

Post by ensignvorik »

AlchimistaKumo wrote:good day, i have a problem with qnap kodi 17.1 and mysql.
i hope to be in the right place :D .
i ve installed mysql and phpmyadmin and i ve created a db.
i ve change advantsettings on my smartphone kodi and i've seen that was created myvideo107 and mymusic60. and works.
after i ve do the advantsettings change in the qnap kodi, kodi start but dont refresh the libraries and dont set the contents type. i set it on the source but dont apply the change.
Someone has an idea of ​​what happened?
Thankyou to all
What's the kodi.log file say, this will give you the biggest clue as to what's going wrong.
Unless I'm being blind, I can't find the setting to change what kind of QNAP I have on my profile. I now own a TS-253A
AlchimistaKumo
New here
Posts: 3
Joined: Tue Jan 31, 2017 6:11 am

Re: Help with Mysql and Kodi setup

Post by AlchimistaKumo »

thankyou ensignvorik, i've find the log. there are some errors with th db.

20:27:46.437 T:140203063899904 ERROR: Unable to open database: MyMusic60 [1045](Access denied for user 'kodi'@'CasaNas' (using password: YES))
20:27:46.462 T:140203063899904 ERROR: Unable to open database: MyVideos107 [1045](Access denied for user 'kodi'@'CasaNas' (using password: YES))

there are 20/30 attemps to open databases with differents numbers MyMusicxx MyVideosxx
AlchimistaKumo
New here
Posts: 3
Joined: Tue Jan 31, 2017 6:11 am

Re: Help with Mysql and Kodi setup

Post by AlchimistaKumo »

i solved.
in phpmyadmin i ve add the user kodi and the host CasaNas
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”