Kodi Community Forum
MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library (/showthread.php?tid=85654)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29


RE: - DasMarx - 2012-03-12

I did some testing and it looks like there is a check going on before you see your movie list:
(2012-02-24, 12:56)DasMarx Wrote: snip

jmarshall actualy answered this and i think we might see some change in this behavior in the future ( probably not in eden)

(2012-02-24, 00:49)jmarshall Wrote: It's not asking mysql at all about the existence of a thumbnail. The thumbnail check is a simple file stat. As the thumbnail is probably located on a network share (via pathsubstitution) this is slow as hell.

I've said about a million times that this is A BAD IDEA for exactly this reason.

Note that it won't be solved until the thumbs move into the texture cache (I'm about 70% of the way there for video thumbs).

Cheers,
Jonathan




RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - T800 - 2012-03-27

If I host the MySQL database on my main HTPC will the library be just as quick as it used to be without MySQL


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - darkscout - 2012-03-27

I host it on another computer and don't notice anything.


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - T800 - 2012-04-03

if I set up a MySQL database now and then a few weeks later I want to add another HTPC and use that with the MySQL database how do I add another machine at a later date?

Also if I don't share my thumbnail folder and each machine has there own one (copied originally from the main HTPC) when are the images updated/added to the thumbnail folder?


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - noner - 2012-04-03

(2012-03-12, 17:43)baldsasquatch Wrote: I've applied all the mySQL tweaks
...
Anything else I could check? Or are others also experiencing the same performance with 1000+ movies.

Im no expert but...

If you have not already done so..

Enable Query cache

Based on your server specs, adjust
query_cache_size
query_cache_min_res_unit
query_cache_limit
max_allowed_packet

Enable the slow query log, and set it to something reasonable (I have mine set to 1 sec) that will tell you what operations are taking long. My server has been up for 14 days after the last restart, and I have had 113 out of 1986800 questions that take longer than 1 sec. to complete

Also ensure that your server is able to cache connections and threads, if its trying to establish a new connection each time it asks a question, that causes overhead as well

Quirky thing with the qcache is that if there is an update to the underlying table, the cache gets invalidated and MySQL goes back to disk to fetch the result set again

That being said, I have ~1700 movies and over 3000 TV Show episodes and MySQL running off a dedicated NAS, and looking at my DB logs, MySQL still returns result sets in under a second, but it sometimes takes XBMC anywhere between 5-10 seconds to process through the response depending on my HTPC hardware (the Intel i7 is the fastest, while my ATV2 is pretty slow).. It also varies depending on how long instances have been running or if they have just been started.. I am guessing thats because there is a bunch of addon scripts that get run as soon as XBMC starts which slows down other operations such as listing the libraries

The other bottleneck I see (as others have pointed out) is the Thumbnails folder, which I have also on the NAS shared through NFS across 4 XBMC instances



RE: - noner - 2012-04-03

(2012-03-08, 00:26)parrydave Wrote: I need a little help! New to mysql and having a few problems. Have everything set up and sharing libraries from MySQL. But i'm struggling to apply the index tweaks in post #5 of this thread.

When I apply the code, it reports back:
Query OK, 0 records affected
Records: 0 Duplicates: 0 Warnings: 0

But I have 200+ records in the movie table. Why are no records updated? Could it be an access problem? I'm logged into root.

thanks for any advice
Dave

you can check to see if the key has been applied to the table

show index from table_name;

Make sure that they key you were trying to add appears in the list and you are fine.



RE: AppleTV2 access to SMB share on the server - noner - 2012-04-03

(2012-03-01, 22:28)MrWedel Wrote: XBMC is presenting itself as "mobile" and there are no "mobile" user on the server and it does not help if I add a user to the server called mobile and gives is alpine as psw..

Again, not an expert... but...

Did you remember to add the mobile user to the folder permissions?

OR

On WHS, grant permission to Guest/Everyone to the folder you are sharing


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - noner - 2012-04-03

(2012-04-03, 18:59)T800 Wrote: if I set up a MySQL database now and then a few weeks later I want to add another HTPC and use that with the MySQL database how do I add another machine at a later date?

On your new machine just copy over the advancedsettings.xml from your existing install (or create a new one)

Quote:Also if I don't share my thumbnail folder and each machine has there own one (copied originally from the main HTPC) when are the images updated/added to the thumbnail folder?

I believe they are done when its first added to the library, so the machine that does the first scan for the new content will be the one ending up with the thumbs. I believe this is why there are suggestions to only update the library on one machine, and then set up a scheduled sync of the thumbnail folder across the others in cases where the thumbnail folder is not shared



RE: - noner - 2012-04-03

(2012-03-08, 07:52)thrak76 Wrote: I'm getting the error "firewall exception rule not applied" or something like that, when i get done with the initial configuration of MySQL.

I've forwarded the port 3306 in my router, and added an exception for the installer and the TCP/UDP ports in windows firewall.

I go through the user creation in the server and create the databases.
When running the command: SELECT host,user from mysql.user;
I get a return with the ip 127.0.0.1, instead of the machine ip. I'm lost. Should i be pointing the AS.xml to that ip address, or my machine's local ip, as set with the router?

Thats the host where the user is allowed to connect from, in your case, the user will only be allowed to connect from the machine that MySQL is installed on (which kinda defeats the purpose of doing this)

127.0.0.1 = localhost = your network loopback interface

You need to let the user be able to connect from all the machines that will be running XBMC. And each advancedsettings.xml file should have the ip of the server running MySQL. If you are running an instance of XBMC on the same machine as you are running MySQL, on that machine only, you can use either the full ip or the loopback and both will work, provided the MySQL user has been granted permission to connect that way

This can be accomplished by either creating individual host records for the user in MySQL, an IP based wildcard record for the user depending on your local network config (as an example, "192.168.0.%" will allow you to connect from any ip within the 192.168.0 range)

or just set host to "%" which will allow it to connect from any host/ip combo.. simplest way to accomplish this:

GRANT ALL ON *.* TO 'USER'@'%';

Be advised though, the command above gives all rights from all hosts to USER, but unless you have any ecommerce websites running on that same MySQL DB you should be fine Smile


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - turbinez - 2012-04-04

I have an external HDD connected to my Airport Extreme Router which acts as an AIRDISK, this is what I'm currently using as one of my sources. Could I install mysql to run on the HDD or do I need a dedicated computer or NAS like a QNAP to achieve this?


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - Steini - 2012-04-10

You need some sort of server - computer og nas.


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - tOM_XB - 2012-04-13

hello everyone

just had a read through recent discussion, sorry if I'm duplicating - I'm not sure if I am or not.

I've put a thread in 'windows' but perhaps should have joined in here - I think I've got a permissions problem with MySQL but no idea how to diagnose or fix. Can anyone help?

my thread: http://goo.gl/8n5id

thanks very much.


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - agreendc - 2012-04-17

So, I tried to read as much of this as possible before posting and didn't see anyone having the same issues as myself.

I had the MySQL database set up and working perfectly, and then I decided to upgrade from WHS to WHS 11.

I got MySQL installed as per some of the instructions in this thread, however now when I go to open the command prompt, it asks for my password. I enter it and hit enter, then the window closes really quickly with no error message or anything.

Any ideas? I have uninstalled and re-installed several times. I believe the ports are forwarded through both my firewall and router, although I don't see how that could affect the program in this manner.

Thanks for any help, and sorry if it has been addressed already.


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - ethanol - 2012-04-27

I installed XBMC w/ a shared library on my homeserver (WHS 2011) using the standard guide and mySQL.

Initial Library was Adult (not XXX!) films / TV shows. I also created a 2nd profile (Kids). I renamed the default Master profile to Adult.

I then installed XBMC on 2 more W7 PCs and also pointed them to the shared libraries.

Now I have a strange issue :
- Sometimes when I log-on as "Adult" profile, I can view the adult videos / tv shows when browing via files but when I look at Library (Movies / TV SHows) its giving the kids movies (but without the thumbnails).
- Other times it works fine.

Any ideas where to start looking why it is sometimes getting confused?


RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library - madcow - 2012-05-11

(2012-04-27, 01:26)ethanol Wrote: I installed XBMC w/ a shared library on my homeserver (WHS 2011) using the standard guide and mySQL.

Initial Library was Adult (not XXX!) films / TV shows. I also created a 2nd profile (Kids). I renamed the default Master profile to Adult.

I then installed XBMC on 2 more W7 PCs and also pointed them to the shared libraries.

Now I have a strange issue :
- Sometimes when I log-on as "Adult" profile, I can view the adult videos / tv shows when browing via files but when I look at Library (Movies / TV SHows) its giving the kids movies (but without the thumbnails).
- Other times it works fine.

Any ideas where to start looking why it is sometimes getting confused?

I noticed the same. I also have 2 profiles. After a clean start, the first switch in profile correctly switches the library, bur when I switch back, I see the entries of the 2nd profile.Restarting XBMC resolves the issue and then libraries are correct again. The only solution so far is to restart XBMC after have switched profiles.

I actually just posted something on this error to see if others also have this:
http://forum.xbmc.org/showthread.php?tid=131250

forgot to mention: my inital setup was the masterprofile and 1 additional profile. As an alternative I tried creating 2 profiles and not use the masterprofile, but I ended up with the same behaviour.

are you by any chance also running Openelec 2.0 beta3?