Help with MySQL please
#1
Hello all,
I need some help with setting up a MySQL db.
I've read the wiki but I can't figure out what I'm missing.

I have a main PC running W7 which is my NAS (192.168.1.127).
I have a NUC running W10 Krypton RC3 and I have a ODroid C2 running Krypton RC2, as well.

I've d/led and installed version 5.5.42. on the main PC.
I've added a advancedsettings.xml in both boxes:
Code:
<advancedsettings>
<videodatabase>
    <type>mysql</type>
    <host>192.168.1.127</host>
    <port>3306</port>
    <user>kodi</user>
    <pass>kodi</pass>
</videodatabase>
    <video>
    </video>
<videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>
I exported my library to multiple files from my NUC (which previously had all my non MySQL videos from NFS).
I then added new Sources on the ODroid C2.
Both boxes show a MyVideos107.db
However if I watch something on one box it's not being marked as watched on the other one.

When I look at one of my video's path I still see: NFS share/letter of the drive on my NAS.
Should I be seeing something different?
Also, how do I access the db on the main PC? Looking in the C:/ drive all I see is a MySQL Server 5.5 but I don't see an application that can be opened...
Sorry for all the questions but it's really confusing to me Sad
Box 1: ODroid N2+ 4GB
Box 2: Intel NUC D34010WYK (Windows afedchin's Krypton MVC Build)
Box 3: Vero 4K
RIP schimi2k | I miss you buddy :(
Reply
#2
You are running a NAS with Windows 7, but are using NFS? As far as I know Windows doesn't support NFS out of the box, you might better stick to Samba.
Also, if you don't know how to access the MySQL server I expect you also haven't configured it yet. There's your problem. It doesn't work out of the box and needs to be configured.
I only have some experience with MySQL running on a Synology NAS and there it's configured through a webinterface, I expect it's the same on Windows.

Be warned, the MySQL configuration for Kodi has always been experimental. It works fine but requires you to be comfortable with IT.
I think all righthtinking people in this country are sick and tired of being told that ordinary, decent people are fed up in this country with being sick and tired.
Reply
#3
PH-SYM,
Everything works fine using NFS with HaneWIN on Windows.
I think I configured the MySQL server during the setup where I entered a name for it, password, granted permission, etc.
Here's the Commandline:
Image
That means it's set up, no?
What I don't know now is how to actually access my db with a webinterface.

I'm thinking about starting a fresh library on the ODroid but I'm not sure how to Add Sources, do I choose NFS share and point to the mapped drives or should I point to the IP address of the MySQL server?
That's where I'm confused I guess...
Box 1: ODroid N2+ 4GB
Box 2: Intel NUC D34010WYK (Windows afedchin's Krypton MVC Build)
Box 3: Vero 4K
RIP schimi2k | I miss you buddy :(
Reply
#4
Just to warn you that if they have not rewritten the code in the library management there are several bugs in how the dynamic queries are build that end up in queries that take 10 MINUTES to execute!!!!!
I've reported this several years, versions ago but I do not think it has even been fixed.
At the time I even spent the time to redesign the correct data structure for Kodi libraries (that are quite messy) but they have never been adopted Sad sigh Smile

for your question the DB is independent from shares etc... is just where data is stored.
Local cache is local Smile and the path can be smb or NFS as far as I know
If you think I'm useful please use the +/- button to raise my reputation
Reply
#5
(2017-01-24, 23:17)ArieS Wrote: What I don't know now is how to actually access my db with a webinterface.
On my QNAP NAS, access to the database is by a program called phpmyadmin. I just searched, and it seems that it can also be installed in windows.

On my mysql database, kodi also created a music database, I would have expected that to be there when you queried the existing databases.
Reply
#6
I wouldn't expect a music database because he hasn't configured that.

Please post a debug log (wiki) to a paste site of each client accessing your library.
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
#7
You do NOT create the mysql databases for kodi. Kodi will create them. What I did was NOT create any kind of sources until I had MySql setup. Then I went to what I consider the primary machine with all other devices turned off or not running kodi, and created the video/music sources. Just like magic kodi and mysql made up the databases. The Wiki strongly suggests you use a particular version of MySql because newer releases have issues with kodi. I have NO experience at all with MySql and simply used the instructions linked below to set up my system. I did NOT need to do any export/import to achieve any of this.

EDIT: Links removed to avoid possible issues Wink

Direct Downloads

MySql V5.5.42 32 Bit Windows
MySql V5.5.42 64 Bit Windows
Reply
#8
The instructions are in the wiki.

http://kodi.wiki/view/MySQL

Please follow them, rather than anything else.
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
Breaking News: I'm an idiot...

For some reason I didn't put the advancedsettings.xml in the userdata folder but in the Kodi folder on the NUC.
I've realized that after looking at the debug log I just made...
Thanks nickr for suggesting the log thing and I know I should have done that from the start... Blush

One more question, I was told a while ago that if you use MySQL and you delete a movie/tv show from your hard drive, you also need to manually remove it from your MySQL, is that correct?

I've finally figured out how to connect to MySQL db using MySQL Workbench but I have yet to figure out how to actually see my db with it...
Box 1: ODroid N2+ 4GB
Box 2: Intel NUC D34010WYK (Windows afedchin's Krypton MVC Build)
Box 3: Vero 4K
RIP schimi2k | I miss you buddy :(
Reply
#10
If you physically delete a file, you also have to remove from library. This is so whether you use MySQL or the standard library.

On library view, context menu and choose 'remove from library'.
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
#11
Or simply use Clean Library once in a while?

What about if I press play on a file that is not there anymore, Kodi asks if I want to remove it from the library, is that enough?

My point is, do all these options achieve the same end result?
Box 1: ODroid N2+ 4GB
Box 2: Intel NUC D34010WYK (Windows afedchin's Krypton MVC Build)
Box 3: Vero 4K
RIP schimi2k | I miss you buddy :(
Reply
#12
Yes they all achieve the same.
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
Help with MySQL please0