Win Central MySQL database not importing data
#1
Hi everyone,

I've got two devices on my network and I would like them to have a unique library. The main server should be my Windows 8.1 machine, and the second one is my RasPi (Rasbmc). I'm only using the video library as I only listen to music via Google Play Music.

This is what I've done
  • I followed the XBMC wiki page on how to set up a MySQL database (but I used an xampp installation. Is this worse?)
  • The video library has been exported to multiple files (which have cluttered my clean folder structure. Gnarf!)
  • I created an advancedsettings.xml and copied it to c:\Users\[MyUserName]\AppData\Roaming\XBMC\userdata\ (for the exact content, see below; IP address is correct, I just checked it in ipconfig)
  • I rebooted the computer, started XBMC, re-set the path to movies and the path to the tv shows to \\MyServer\Videos\Movies and \\MyServer\Videos\TVShows ... and this is where I now struggle.
First, if I try to set the content of the movie folder to "Movies", scraping from "Local Information only", nothing will happen. The content type appears to stay "none". Same applies for TV shows.
Furthermore, I'm unsure upon what exactly to do with this import function. I've tried the root folder (as network share) S:\Videos and the real folder S:\Videos\Movies as well as the local folder C:\Network Share\Videos\Movies but nothing will happen. It won't even show a bar indicating the process of scanning, and I haven't disabled it.

Does anybody have an idea what I could try next? I'm a little bit afraid that all the information which TV shows I've already seen might be lost Undecided

Thanks in advance and have a nice weekend!

Momro

--
Content of the advancedsettings.xml:
Code:
<advancedsettings>
  <videodatabase>
    <type>mysql</type>
    <host>192.168.0.101</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
  </videodatabase>
  <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.101</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
  </musicdatabase>
  <videolibrary>
    <importwatchedstate>true</importwatchedstate>
    <importresumepoint>true</importresumepoint>
  </videolibrary>
</advancedsettings>
Reply
#2
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
#3
Hi,

sorry I didn't attach the log! I think this is it:

http://xbmclogs.com/show.php?id=264243
Reply
#4
Quote:13:30:00 T:1740 ERROR: Unable to open database: MyMusic46 [2003](Can't connect to MySQL server on '192.168.0.101' (10061))

That is a 'connection refused' error. So, either the MySQL server isn't running, is running but listening on a different port, or is configured to only accept local connections. The other option is that a firewall is blocking the connection.
Learning Linux the hard way !!
Reply
#5
There's an issue with the MySQL server, but once you get that solved don't forget (as mentioned in the wiki) that you need to use the "smb://server/etc" format, and not "\\server\etc\".

I would also set content for the folder as you normally would, with a scraper and not with "NFO only". XBMC will automatically use the NFO files when it sees them, but you still want a scraper set for when you add new movies and shows.
Reply
#6
Hm, ok, I'll switch to the smb-like structure. Indeed, the database is working fine now. I don't know why MySQL hadn't been started last time. I thought I had started the service ...

Now I had a look at the databases and there are only "test" and "INFORMATION_SCHEMA". I guess XBMC isn't writing to INFORMATION_SCHEMA, and "test" doesn't have any tables. I haven't tested other XBMC installations yet, but I guess they won't work at this point anyway. Should I have inserted a <name> tag in the advancedsettings.xml?
Reply
#7
The database will be created when an xbmc instance connects and finds no database.
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
#8
It didn't work when I connected my Pi to the smb share. It was looking for all the information from scratch and no database was created or any information taken from the server. I'll try the likehacker guide now :-/

Edit:
That doesn't work either. I don't understand how XBMC, on my server, can log that it executes insertions to the database when there are no tables. I've created another log here to show this.

Edit2:
It appears that the Pi couldn't open the advancedsettings.xml, though I've put it in /home/pi/.xbmc/userdata/ I had to change the owner (chmod pi advangedsettings.xml chmod :pi advancedsettings.xml chmod 666 advancedsettings.xml) to make it accessible to XBMC.
But still, the database on the server is not being populated :-(
Reply
#9
don't use the lifehacker article. Use the wiki, it is correct.

Is your user really USER and your password PASSWORD? or did you massage the log?

Take out the <name> tag.

On reflection the database may be created when you scrape - did you scrape?
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
#10
Hm, for some reason, the database got populated with the databases xbmc_video57 and xbmc_music83. I edited the advancedsettings.xml accordingly and all devices sync properly.

(USER and PASSWORD were not the credentials I have entered. I guess it has been changed by xbmclogs.com? It's all fine on my local settings)

Thanks a lot guys! :-)
Reply
#11
(2014-08-11, 08:41)Momro Wrote: (USER and PASSWORD were not the credentials I have entered. I guess it has been changed by xbmclogs.com? It's all fine on my local settings)


The Log Uploader addon edits out usernames and passwords.

Glad to see it's all working for you Smile
Learning Linux the hard way !!
Reply
#12
Using those names you are in for a world of pain when you upgrade to the next xbmc version. Go Lifehacker.
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
#13
Nah, the name-tag should work now. The main issue with the lifehacker guide is they tell you to create the MySQL DB first, when XBMC should be the one to create it. So if it's working now then in theory it should work just fine for updates, as long as the XBMC MySQL user has access to make new DBs.
Reply

Logout Mark Read Team Forum Stats Members Help
Central MySQL database not importing data0