Sync XBMC Lib
#1
Hey,
I used the wiki guide:
http://wiki.xbmc.org/index.php?title=HOW..._libraries

Got an OK for both sql commands.

But when I try to scan for new movies in XBMC it does nothing.

When I delete the advancedsettings I can add without a problem.

I have both running on the same PC.
I tried 127.0.0.1 and the ip (192.168.0.23).

I am using mysql 5.5.19

EDIT: Oh and when I scrape the Infos via Ember does XBMC use them directly or scans them and still saves them in a separate DB?
Reply
#2
TeKo Wrote:EDIT: Oh and when I scrape the Infos via Ember does XBMC use them directly or scans them and still saves them in a separate DB?

If you have not scanned something into the library and use ember to create an .nfo then XBMC will read the .nfo and save that data into the library. The next time you get info for that media XBMC will read the library and not the .nfo.

If there is already a library entry then you need to manually refresh the info to get XBMC to read the .nfo
Openelec on ASRock ION 330 / Kodi on Win 7 PC
Reply
#3
If you use version xbmc 11.0 “Eden” you need to remove tag <name> in
advancedsettings.xml. Eden use diffrent database structure than the previous
version Dharma and will create needed folders automaticly in your mysql database.
I spent 2 days on this problem following the same guide as you.
Now it works perfect.

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>
Reply
#4
Thanks, but still not working.
Is there a way to check if the mysql db is running like it should?
Reply
#5
TeKo Wrote:Thanks, but still not working.
Is there a way to check if the mysql db is running like it should?

Turn on debug mode in XBMC, run XBMC, quit XBMC, check the log created. I have done this and found tons of errors connecting to my SQL server due to a firewall issue. Fixed that and found issues with the database structure which has brought me here Smile

Quote:<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
</advancedsettings>

Orje, are you saying that the database table name lines need to be removed completely? Simply removing the tags doesn't seem to make sense to me. I'm about to try this sans tags, fingers crossed. XBMC becomes VERY unhappy when it starts and can find no database Shocked

Okay, I simply tried it Big Grin REMOVE the lines that specify table names and XBMC will do the table creation just fine! I'm not yet sure what this will do when I fire up a second instance but perhaps on that instance I'll need to specify the new tables, I'm not sure. In any case the import appears to be working - yay! Next up will be storing the thumbnails and whatnot in a central location...
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#6
You can keep or remove the name property. Eden seems to assume its xbmc_video by default. You can name your tables anything you want though by using the name param. I have a dev atv2 that i upgrade first for testing when updates come out, it uses its own tables defined like <name>xbmcdev_video</name> so i dont accidentally screw up the rest of the tv's in the house. Wink
Reply
#7
Ok thanks going to try that tomorrw.
Reply
#8
BLKMGK if you want to play it safe, once you get the first instance of XBMC up and running with the new database, you can go back and replace the <name> tags in all of your advancedsettings.xml on each machine. Just make sure you use the NEW database name, not the old one.

I've been running without any <name> tags for a couple of months now without any issues. I'm not going to say it will be the same for everyone, but it doesn't appear to be entirely mandatory at this point. XBMC seems to automatically check the server you list in the advancedsettings.xml for any current versions of the database and will use them if it finds them. If it finds an old version but no current version, it will create new databases and populate them with the data from the old databases. If it finds the current version of the database that it is expecting to find, it simply uses that and ignores the old ones. If it finds neither new nor old databases, it simply creates new ones to suit it's needs.
Reply
#9
Well, I started out with an xbmc_video table etc. per the Lifehacker article. However my system ran into all sorts of issues with the database version ad wasn't updating it - i was also unable to import. Dropped the name tags per Orje and suddenly it created it's own and went to town when I tried to import Smile Oddly it only exported my Video database and did nothing for TV shows, found out my Music database that I exported was empty too - oops! Rescanning that one and will rescan the TV shows on the second machine. I'm using HeidiSQL to look over the tables and whatnot BTW - it's a nice Windows GUI. In the future I'll move my SQL server to something other than my desktop although I'm not sure I'll do it on my unRAID. <shiver> Thumbnails next!

Anyway, am NO expert on this by far but thrilled that it seems to be working at last for me! Appreciate the input though, this is new territory for me Big Grin

P.S. If I put the name tag back for the new database, what will it do when it needs to upgrade? Will it upgrade in place or try to create a new one or run into the same issues I had when it didn't like the empty tables I created per Lifehacker this time?
Openelec Gotham, MCE remote(s), Intel i3 NUC, DVDs fed from unRAID cataloged by DVD Profiler. HD-DVD encoded with Handbrake to x.264. Yamaha receiver(s)
Reply
#10
Teko, debug logs are needed to better understand your problem. It sounds like, and this is just guessing without logs, you are not connecting to the database successfully. This could be a long list of potential issues. Things to check:

Make sure that you have opened port 3306 in your firewall on ALL machines using or hosting MySQL.

Download HeidiSQL and install it on at least one machine that is NOT hosting your MySQL install. Once installed, configure a connection to your MySQL machine using the IP of the host machine and the user and password you set up for XBMC to use. Be sure that you can connect to the MySQL machine this way. If you cannot, your problem lies in either MySQL or with the machine hosting MySQL (firewall).

You can use any SQL interface you like, it doesn't have to be HeidiSQL. I suggest it because I am familiar with it, I know it works with this setup, and it is quick and easy to setup and use.

Be sure you have used this code in MySQL after creating your xbmc user:

Code:
GRANT ALL ON *.* TO 'xbmc';


If you did not use xbmc as your account name, change the 'xbmc' to 'the_name_you_used'.

As has been stated earlier in the thread, make sure you are NOT using the <name> tags in your advancedsettings.xml. I've seen a few people report no problems with the tag in place, but the majority of people looking for help just needed to follow this step.

Lastly, even if you do not have debug logging on, you will find a boatload of database errors in your xbmc.log file located at %AppData%\XBMC\ if there are any problems connecting to the database. A full debug log will be more helpful for diagnosing what is happening, but the regular log will show you errors on this issue if you just want to confirm that there are database connectivity issues.

After trying all of that, let us know what you discover.
Reply
#11
Quote:P.S. If I put the name tag back for the new database, what will it do when it needs to upgrade? Will it upgrade in place or try to create a new one or run into the same issues I had when it didn't like the empty tables I created per Lifehacker this time?

BLKMGK, it really depends on if the devs make anymore changes to the database between now and your next upgrade. The worst case scenario with the <name> tag in place, SO FAR, has just been XBMC throwing a bunch of database errors, but not doing any damage to existing databases. In that case, you will just have to go back and remove the tags to upgrade, then replace them again afterwards.

The last upgrade or two, for me, it just updated in place with no problems-- but I also did not have the <name> tags in place again, so not sure if it would have been as smooth if I had been using them. It's been a few builds since the last upgrade bump though, so it should have worked fine even with those tags in place.
Reply
#12
Quote:16:38:28 T:4704 DEBUG: Mysql execute: update path set strContent = '', strScraper='', strHash='',strSettings='',useFolderNames=0,scanRecursive=0 where strPath like '%G:\\Filme\\%'
16:38:28 T:4704 DEBUG: Mysql execute: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'G:\\Filme\\','','')
16:38:28 T:4704 ERROR: SQL: Undefined MySQL error: Code (1062)
Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'G:\\Filme\\','','')
16:38:28 T:4704 ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'G:\\Filme\\','',''))

From the log
Reply
#13
Ok, I checked with HeideSQL and somehow XBMC created:
xbmc_video58
xbmc_music18
and some other DBs.

When I change the name to that on my server device I can add movies.

And I can connect to mySQL from a Notebook@Win7.

Now I want to connect to the db via XBMC from a Netbok@openelec.
I have a local db on the Netbook, do I have to delete it or create a new profile?
advancedsettings.xml with db name is installed.
Reply
#14
Orje Wrote:If you use version xbmc 11.0 “Eden” you need to remove tag <name> in
advancedsettings.xml.

This doesn't seem to be true for everyone, and shouldn't happen by design. What OS are you on and what version of MySQL server are you running?
Reply
#15
Ned Scott Wrote:This doesn't seem to be true for everyone, and shouldn't happen by design. What OS are you on and what version of MySQL server are you running?

I can confirm this. I'm running multiple tables for different libraries right now on eden beta ios. It was my understanding that xbmc takes the defined name and appends the db version number on the end. No need to change your name to "tablename#" or omit it all together.
Reply

Logout Mark Read Team Forum Stats Members Help
Sync XBMC Lib0