MySQL Server Questions
#1
Could someone run by a few MySQL things for me?

I've followed the wiki, but I'm having a difficult time understanding a few things.

My advancedsettings.xml looks like this:


<advancedsettings>
<useddsfanart>true</useddsfanart>
<videolibrary>
<cleanonupdate>true</cleanonupdate>
</videolibrary>
<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
</gui>


<videodatabase>
<type>mysql</type>
<host>192.168.1.7</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>192.168.1.7</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>

</advancedsettings>



There's no specific drive location here, such as afp://192.168.1.7:548/Movies
Is this correct? This file was placed in each ATV.

Also, as suggested I've exported my library and removed the old sources from both of my ATV's. It doesn't seem the exported library .xml needs to be edited, as it's network paths seem correct. afp://192.168.1.7:548/Movies/*** etc.

Now I've imported the library back into one of my ATV's from the ATV's home folder which it had been saved to. Is the other ATV supposed to just populate? Am I supposed to import the same file on it?

Any help pointing me in the right direction here? Seems I'm almost there. I guess having read so much, I don't quite get the whole path of everything.
Reply
#2
You only need to import once to populate the MySQL server. Everything looks fine so far.
Reply
#3
Thanks Ned. So the other ATV should just populate? No need to Add.. anything from the files dialogue in that device?

And it's fine to leave the library in that home folder of the other ATV, or should that reside someplace on my Mac from where the server is running?

Also, I've just come across a thread that claims xbmc_video in advancedsettings.xml isn't necessary anymore. Maybe I'm running into an issue there.
Reply
#4
Maybe what your missing (if it's not working yet) is that you need to have the <mysql> parts of your advancedsettings.xml file on each of your XBMC machines. The rest of the file can be anything you need for that specific machine, they don't have to be exactly identical except for these sections.

The reason that you don't need any specific location, i.e. afp... is that they are all connecting through the ip address with the username/password you outline in that file. So, if you have that <videodatabase>... and <musicdatabase>... sections in the advancedsettings.xml file in the right place (depending on OS) on each slave or client machine, they should just populate on their own.

Hope that helps a bit. But it looks great!

Good luck!
Reply
#5
When you imported the database on one of the ATVs, it didn't actually stay on the ATV, but instead went to the MySQL server. Importing via one of the boxes is just a gateway to MySQL. Anything, from any box, will go to MySQL, and thus anything read back will come from MySQL.
Reply
#6
Thanks guys!

I removed the xbmc_video entries in both .xml files. I also stopped the server, rebooted both devices, and reimported my library. Everything's synced.

Incidentally, I noticed my movie library couldn't be removed when I attempted. Which I now understand was because the database doesn't actually stay on the ATV.

Of course now I have to look into syncing thumbs and fanart. The library on my second ATV is barren.
Reply
#7
I've decided to copy and move the Thumbnails folder from one device to the other for now. Importing the new Thumbnails folder hasn't made a difference.

Is there a cache that needs to be reset? How's that done?
Reply
#8
Depends on what version of xbmc you're running. In the nightlies artwork handling has been completely redone and none of the MySql guides advise regarding path substitution apply. The new method is much better in my opinion, if you aren't already you may want to consider using a nightly or monthly snapshot.
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply
#9
I'm using a fresh Crystalbuntu install on both devices.

Though MySQL shouldn't matter, yes? I've just copied the local Thumbnails folder from one device to the other, rather than deal with sharing artwork via MySQL.

The issue I'm having is that after importing the new Thumbnails file to ATV2 from ATV1, ATV2 is still just showing screen captures in its library.

The wiki states:

NOTICE:

For XBMC v11 (EDEN): Sharing thumbnails and fanart via path substitution can make loading the library significantly slower. You may want to simply copy the thumbnails folder across all devices, rather than follow this step.
Reply
#10
Any help guys?

I'm wary of using a nightly in Crystalbuntu. Creating a build is too much right now.

I have XBMC do the scraping for me, so I don't have the large majority of my media files in folders, etc. Again, currently one of my synced devices has no art in its library and the other is fine. Is there anyway to fix this? The MySQL setup seems to eliminate the possibility of scraping data on the 2nd machine too.

I'm close to acing this whole MySQL business and just having the two ATVs run completely separate.
Reply
#11
From the wiki on advancedsettings.xml

Quote: <useddsfanart>

This settings allows XBMC to use your GPU rendering fanart and some other images. This will make loading images considerably faster, especially on systems with slower processors (e.g. atom based systems). Do not use this option on Apple TV2 as it is likely to degrade performance because DDS images are not supported.

This might help you.
Reply
#12
ATV1 and ATV2 are two very different machines.
Reply
#13
They're both original Apple TV's, Ned. I was just using 1 and 2 for reference.

I'm going to run the second ATV on its on for now. Thanks for the help guys.
Reply
#14
(2012-08-24, 05:14)severe Wrote: I'm close to acing this whole MySQL business and just having the two ATVs run completely separate.

I dont know if this is your problem, but XBMC has made several revisions to how the database is being written, so its really important that all of your instances of XBMC (regardless of platform) use the same or at least a very similar build. If you are using a monthly or nightly build, make sure you load that same data on all machines to make sure the databases use the same format.

Assuming thats already done, can you confirm with MySQL Workbench that your database is being populated? If you dont have it already, install MySQL Workbench on a PC on your network and set it up to login to your MySQL database using the credentials you made when you first created it.

Once you are in there, look for your video library and open the table called movies. I am not in front of mine at the moment, but one of those columns will contain a location for the actual media file. Spot check a couple and make sure that whatever path it has stored for your movies, is accessible from every machine on your network.

Aside from this, I dont have much else to tell you other than, keep trying. It is worth it to have your database in MySQL. Not even just for the multi-machine syncing. For me, the best reason to use MySQL is that by having your database separate from your XBMC installation you can freely upgrade, reinstall, multiple versions of XBMC without having to mess with setting up your library each time. I have XBMC on two Windows machines, a Linux based HTPC running XBMCbuntu, and a Raspberry Pi. With the Raspberry Pi, Ive reloaded raspbmc, openelec, and xbian several times and each time all I had to do was copy over the advancedsettings.xml and my library was back.

One other cool feature of having MySQL setup wtih your library is that from within MySQL Workbench, you can export your library to a CSV file which you can open in Microsoft Excel (or pretty much any comparable program) and then make reports on your movies. I do this once a month or so, so I have a spreadsheet I can send to people to show them which movies I have. I have over 1200 movies and its much nicer scanning through a spreadsheet than scrolling through 1200+ movies on the TV.
Reply
#15
Copy sources.xml from your working machine to all other xbmc instances and then you can scrape from the other machines, this will create thunbnails on the other machines. Sources.xml must be an EXACT duplicate or you will get duplicate listings in your database. If your main machine has a passwords.xml copy this to the other machines as well. All xbmc instances are clients and equal, your MySql database is the "server"
If I have been of help, please add to my reputation as a way of saying thanks, it's free.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL Server Questions0