XBMC Community Forum
HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker (/showthread.php?tid=80829)



RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 16:14

Code:
If the user only has permission to connect from PC1, you cant use the same settings to connect from PC2

Could you elaborate on that a little further?


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 16:39

Now I get this error:
Code:
Host 'thomthom.my modem.my gateway' is not allowed to connect to this MySQL server.



RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - protocol77 - 2012-04-05 17:42

for those who may need a little help i just finished getting my tv shows and movies sync's between two machines using a windows file server to manage the database i have also after a lot of trying got it to sync up the posters between the machines for both movies and tv shows i had trouble getting my head around the wiki instructions so worked it out myself and posted what i did here in more direct simple terms for those having the same problem hopefully it can help someone

i set mine up for two openelec htpc's so can't say for sure if it works with others but hopefully it does

http://forum.xbmc.org/showthread.php?tid=127708&pid=1067201#pid1067201


if you have any questions PM me not sure if i can answer most questions as i am far from expert on this it took me several hair pulling hours and constant trips up and down my house check each machine to get this right i posted to hopefully save someone else the same stress Smile


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - noner - 2012-04-05 17:57

(2012-04-05 16:39)thothom Wrote:  Now I get this error:
Code:
Host 'thomthom.my modem.my gateway' is not allowed to connect to this MySQL server.

In your my.cnf ensure you have

skip-name-resolve

On the mysql command line enter

grant all on *.* to 'xbmc'@'%';

Assuming the user is 'xbmc'
(2012-04-05 16:14)thothom Wrote:  
Code:
If the user only has permission to connect from PC1, you cant use the same settings to connect from PC2

Could you elaborate on that a little further?

MySQL has the ability to limit access based on hostname, ip address etc. Each record in the mysql.user table corresponds to what user can connect from what network address.

The MySQL wildcard character is "%"

If there is only one record in mysql.user that says the host is 192.168.0.10 (for example) that means connections are accepted from just that one ip address. If it says 127.0.0.1 that means only connections from the actual host MySQL is running on (localhost) are accepted. If the record says 192.168.0.% that means any ip beginning with 192.168.0 can connect. If the host is set just to "%" then it can connect from anywhere

You can check this by issuing the following at the mysql command prompt

select user, host from mysql.user;

Makes sense?


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 18:41

I created xbmc user and assigned 192.168.1.3, I am running myqsl on my desktop and have xbmc on it too, I also have xbmc running on the media pc in the living room so what I gather is that the single xbmc user will be sufficient for both pc's?
I would also like to sync up all settings, fanart, add-ons etc...would I need to put that in my advancedsettings.xml file?


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - noner - 2012-04-05 18:48

(2012-04-05 18:41)thothom Wrote:  I created xbmc user and assigned 192.168.1.3, I am running myqsl on my desktop and have xbmc on it too, I also have xbmc running on the media pc in the living room so what I gather is that the single xbmc user will be sufficient for both pc's?

yep. just make sure that the user can connect from both pc's, in your case one connection will be from localhost and the other from your media pc in the living room


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 19:00

would I need to install mysql client on the media pc to check that?


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 19:44

(2012-04-05 17:57)noner Wrote:  
(2012-04-05 16:39)thothom Wrote:  Now I get this error:
Code:
Host 'thomthom.my modem.my gateway' is not allowed to connect to this MySQL server.

In your my.cnf ensure you have

skip-name-resolve

On the mysql command line enter

grant all on *.* to 'xbmc'@'%';

Assuming the user is 'xbmc'
(2012-04-05 16:14)thothom Wrote:  
Code:
If the user only has permission to connect from PC1, you cant use the same settings to connect from PC2

Could you elaborate on that a little further?

MySQL has the ability to limit access based on hostname, ip address etc. Each record in the mysql.user table corresponds to what user can connect from what network address.

The MySQL wildcard character is "%"

If there is only one record in mysql.user that says the host is 192.168.0.10 (for example) that means connections are accepted from just that one ip address. If it says 127.0.0.1 that means only connections from the actual host MySQL is running on (localhost) are accepted. If the record says 192.168.0.% that means any ip beginning with 192.168.0 can connect. If the host is set just to "%" then it can connect from anywhere

You can check this by issuing the following at the mysql command prompt

select user, host from mysql.user;

Makes sense?

Worked like a charm, thanks a million.Big Grin


RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - thothom - 2012-04-05 21:56

I have another problem. When I pause a movie in my room to go watch in the living room it doesn't work. Do I need to create a user for connections from the media pc?

UDATE

I have it working, it's a little slow but it's working. Any way you know of to speed up the database?

My my.ini file.
Code:
innodb_thread_concurrency=9
skip-name-resolve
net_buffer_length = 16384
max_allowed_packet = 2097152
query_cache_type = 1
performance_schema_max_cond_classes = 80
performance_schema_max_cond_instances = 1000
performance_schema_max_rwlock_instances = 1000
performance_schema_events_waits_history_long_size = 10000
performance_schema_max_table_instances = 50000
performance_schema_max_rwlock_classes = 20
performance_schema_max_mutex_classes = 200
performance_schema_max_mutex_instances = 1000
query_cache_limit = 100M
performance_schema_max_table_handles = 100000
performance_schema_events_waits_history_size = 10
performance_schema_max_thread_classes = 50
performance_schema_max_file_handles = 32768
performance_schema_max_file_instances = 10000
query_cache_min_res_unit = 1M
performance_schema_max_file_classes = 50
performance_schema_max_thread_instances = 1000
max_user_connections = 0
table_definition_cache = 512
table_open_cache = 128



RE: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - noner - 2012-04-06 17:30

Where'd you get those settings from? They seem pretty off to me. A setting being in the file will override the default. My personal opinion (others here may disagree with me:

Remove the following form the file and let MySQL manage them based on defaults:

Code:
net_buffer_length = 16384
performance_schema_max_cond_classes = 80
performance_schema_max_cond_instances = 1000
performance_schema_max_rwlock_instances = 1000
performance_schema_events_waits_history_long_size = 10000
performance_schema_max_table_instances = 50000
performance_schema_max_rwlock_classes = 20
performance_schema_max_mutex_classes = 200
performance_schema_max_mutex_instances = 1000
performance_schema_max_table_handles = 100000
performance_schema_events_waits_history_size = 10
performance_schema_max_thread_classes = 50
performance_schema_max_file_handles = 32768
performance_schema_max_file_instances = 10000
performance_schema_max_file_classes = 50
performance_schema_max_thread_instances = 1000

Adjust the following:

Code:
query_cache_limit=2M
query_cache_size=128M
query_cache_min_res_unit = 1024

key_buffer_size = 24M
max_allowed_packet = 1M
table_open_cache        = 24576
sort_buffer_size = 2M
read_buffer_size        = 2M
read_rnd_buffer_size = 2M

innodb_buffer_pool_size = 128M

join_buffer_size = 2M

max_connections = 10
max_join_size = 4294967295

# Keep the 2 below the same:
tmp_table_size = 16M
max_heap_table_size     = 16M

See if that helps with performance