MySQL and SMB
#1
I have two windows 7 PCs with Kodi installed. One PC has three hard drives connected via USB. I am trying to setup MySQL to share my library. Can I install MySQL on the PC with the hard drives attached? If so, will I have to change the source location from local to SMB on the PC with the hard drives?

Right now my source is local E:\movies

Wouldn't that need to be smb:\\10.0.0.15\movies.

I am a bit confused on how Kodi will see sources with MySQL, when the source is a local disk.

I have been trying to share these libraries, but I kept getting "the file is no longer available" on the second PC (without MySQL), so I have uninstalled Kodi on both PC and I am starting fresh.

Just wanted to clear this part up, before I begin again.

Any suggestions, will be greatly appreciated.
Reply
#2
Yes, it'll need to be the same location for all devices. But even the machine hosting the SMB share can access it's own shares by the share address. I had to convert my library from drive location to smb location, I did it by exporting the entire library to one file, then search/replace the locations in the XML file, then reimporting the library.
Reply
#3
How do I import the videos to Kodi from the SQL server?

The static ip of the PC is 10.0.0.16.

So I tired smb://10.0.0.16/movies, but it cannot be found.

Also when i search under windows smb, nothing comes up.
Reply
#4
After I export my library, how do I import it?

"Open any of your installs and re-import your library data"

"Add (or just "set content" on) the networked video source to XBMC/Kodi and scan it in as if you were setting up your library for the first time (see adding videos to the library). However, XBMC/Kodi will read the exported nfo files and images and use those instead of rebuilding the library from scratch. The end result will be an identical library, and your watched status for videos will be preserved.
Note: You must add a network source using XBMC/Kodi's standard formatting. For example, use "smb://192.168.1.20/Videos/" and not "\\BOBPC\Videos\". Try to use static IP addresses over NetBIOS names if using SMB."

So do I just add the source and re scan it? On my PC now my movies are located in local E:/ in a shared folder called "movies". Would the sql server now be smb://10.0.0.6/movies?
Reply
#5
Export your library as one file.

Make a copy, just incase you screw up changing the XML.

Use find/replace to fix up your XML file for the library. Also, if any of your clients are going to be running Linux (Not sure about Android) all your slashes need to be changed. smb://blah/bla\ not smb:\\blah\\blah\ but Windows should take slashes in either direction.

Change your advancesettings.xml so as Kodi will use the MySQL database instead of the internal DB.

Kodi should now start and have an empty library because the MySQL DB is empty of any library entries.

Import your modified library and it will all be written to the MySQL Database instead.
Reply
#6
ok so, when I have all my movies and tv shows loading into kodi ill export the library to one file.


What XML file do i edit? The only one I have been editing is the advanced settings.


Then Change the advancesettings.xml


Kodi will start and have an empty library because the MySQL DB is empty of any library entries.


Import your modified library. How do I go about importing the modified library, do I add sources as usual or do I import the single exported file via the system settings??
Reply
#7
There will be an XML file in your exported library, where ever you export that too, which will contain everything, file locations, episode descriptions, every bit of data on the library in text. Find that one.
Reply
#8
Ok I found the .XML file. Is there anything in there I actually have to change?

Did you add the sources to your advancedsettings.xml?
Reply
#9
Here is my current advancedsettings.xml

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>10.0.0.16</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>10.0.0.16</host>
<port>3306</port>
<user>kodi</user>
<pass>kodi</pass>
</musicdatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
</advancedsettings>
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL and SMB0