Forum
XMBC and MySQL - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Others (/forum-24.html)
+--- Thread: XMBC and MySQL (/thread-1314.html)



XMBC and MySQL - rbthompsonv - 3rd Sep, 2013 11:34 PM

Not sure if I should be posting this here... but having MAJOR difficulties getting my Xbian driven Raspberry Pis to sync with my SQL server... This is my setup:
Office Dell Optiplex running Ubuntu 12.04, 1 250gb hhd running the OS, 2x2tb hard drives in raid put together with LVM and sharing 2 folders: TV and Movies... The videos are ported into XBMC as SMB://192.168.1.101/Movies (or TV)...
Server is running XBMC at all times, and I essentially coped and pasted the advancedsettings.xml from the wiki... changing the IP to 192.168.1.101 (The IP of my server)

I put the same exact xml on each raspberry pi under .xbmc/userdata

The RPis see the shared folders and I link to them via SMB://192.168.1.101/Movies/ and SMB://192.168.1.101/TV/ (Named Movies and TV Shows respectively on each RPi)

1 Rpi and the Server are wired connections, 1 RPi is wireless (My mac is also running XBMC and shared with the same structure... with no joy)

Set up the MySQL server as per the wiki instructions...

How can I troubleshoot this situation, or what do I look for? What other info can I supply?


RE: XMBC and MySQL - mk01 - 3rd Sep, 2013 11:58 PM

with mysql, the steps to check would be:
1) check whether mysql is accessible from .101 itself. for instance with:
Code:
mysql -u user_name_you_set -p
2) check whether the mysql is accessible for the user from other IPs (by default the access is just for localhost (127.0.0.1). you can do that still from the optiplex.
Code:
mysql -u user_name_you_set -h 192.168.1.101 -p
3) then check this from RPI…

btw: /home/xbian/.xbmc/temp/xbmc.log is quite useful in that case, what is in on the RPI?


RE: XMBC and MySQL - rikardo1979 - 4th Sep, 2013 12:15 AM

any help in these threads? we have quite a few in forum
http://forum.xbian.org/thread-1248.html?highlight=mysql
http://forum.xbian.org/thread-1133.html?highlight=mysql


Re: XMBC and MySQL - rbthompsonv - 4th Sep, 2013 12:29 PM

OK... Can't login from 101 to 101... Will check things in the morning...


RE: XMBC and MySQL - rbthompsonv - 4th Sep, 2013 10:00 PM

(3rd Sep, 2013 11:58 PM)mk01 Wrote:  with mysql, the steps to check would be:
1) check whether mysql is accessible from .101 itself. for instance with:
Code:
mysql -u user_name_you_set -p
2) check whether the mysql is accessible for the user from other IPs (by default the access is just for localhost (127.0.0.1). you can do that still from the optiplex.
Code:
mysql -u user_name_you_set -h 192.168.1.101 -p
3) then check this from RPI…

btw: /home/xbian/.xbmc/temp/xbmc.log is quite useful in that case, what is in on the RPI?

OK, I can connect TO 101 FROM 101, but only locally... If I try to connect with the -h I get can not connect to host.
It also seems as if there isnt a password set for the xbmc user... I tried reading the docs for MySQL... but I must have the syntax wrong for assigning the user xbmc the password of xbmc...
Any pointers? (Im using: SET PASSWORD FOR 'xbmc' = PASSWORD (xbmc); But it kicks back saying theres an error on line 1


RE: XMBC and MySQL - rbthompsonv - 5th Sep, 2013 07:39 AM

(4th Sep, 2013 10:00 PM)rbthompsonv Wrote:  
(3rd Sep, 2013 11:58 PM)mk01 Wrote:  with mysql, the steps to check would be:
1) check whether mysql is accessible from .101 itself. for instance with:
Code:
mysql -u user_name_you_set -p
2) check whether the mysql is accessible for the user from other IPs (by default the access is just for localhost (127.0.0.1). you can do that still from the optiplex.
Code:
mysql -u user_name_you_set -h 192.168.1.101 -p
3) then check this from RPI…

btw: /home/xbian/.xbmc/temp/xbmc.log is quite useful in that case, what is in on the RPI?

OK, I can connect TO 101 FROM 101, but only locally... If I try to connect with the -h I get can not connect to host.
It also seems as if there isnt a password set for the xbmc user... I tried reading the docs for MySQL... but I must have the syntax wrong for assigning the user xbmc the password of xbmc...
Any pointers? (Im using: SET PASSWORD FOR 'xbmc' = PASSWORD (xbmc); But it kicks back saying theres an error on line 1
WORKAROUND: Created a new account on MySql called media... worked flawlessly once put into advancedsettings.xml as media/media..


RE: XMBC and MySQL - mk01 - 8th Sep, 2013 09:44 AM

I suppose the problem will be in the defaults of mysql accepting connections only from localhost for you user xbmc. You can check that by using the "mysql" tool.

Code:
mysql -h localhost -u XXXX -p
connect mysql;
select Host,User,Password from user;

if there is no "%" in the "Host" column for a specific user (% means any host), you can update the table with
Code:
update user set Host='%' where User='youruser';

check some guides or install Windows client to manage mysql DBs - http://dev.mysql.com/downloads/tools/workbench/