Page 1 of 2

Using the built in MYSQL server to share XBMC library

Posted: Wed Dec 26, 2012 7:04 am
by horigome
Dear Amahians

I've set up Amahi on a brand new server during the Christmas break, running Ubuntu 12.04. It's working flawless and all in bloom. There is however one more thing that I would like finish before the break is over. At my home there are plenty of different computers/devices running XBMC and I would like to utilize the MySQL server that comes with Amahi to have one complete database for my home. I'm a total beginner when it comes to dealing with MySQL databases.

I have gone through a few different tutorials on how to do this, most noticebly the one on http://www.howtogeek.com/75535/how-to-s ... with-xbmc/, I also stumbled upon something similar in the Amahi FAQ for Fedora. But neither worked for me; the scrambler didn't work at all and XBMC did not create the database on my server etc.

I came across this tutorial implementing phpmyadmin to create a user etc http://www.youtube.com/watch?v=U6PPouAnnpY so I installed it on my HDA but to no avail. When I've read the most common issues regarding this subject I've found out that it almost every time has to do with permissions and bad links. Has anybody been through this process and is willing to share his experience?

Best wishes from Iceland.

Re: Using the built in MYSQL server to share XBMC library

Posted: Fri Dec 28, 2012 3:12 pm
by cpg
This is an interesting area. The best thing would be to build a small webapp (or package it as an Amahi one-click app, since that allows you to get a database for it easily).

However, that requires you to be able to program a bit, even if minimally in some language like PHP or ruby or something, to at least manage the database.

In Amahi 7 this will be easier, since we plan to add plugins, but for now, this requires some amount of programming knowledge.

Maybe people interested in this subject can get together and create a spec (specification) of what needs to be done -- that would get things going to begin with and someone jumps to it. Heck, I may try some time. But the details need to be clearly specified first.

Interesting stuff!

Re: Using the built in MYSQL server to share XBMC library

Posted: Sun Dec 30, 2012 1:59 pm
by mrioa
Hi horigome,

I followed the guide from "howtogeeks" and at first it didn't work. Then I enabled Debugging in XBMC (like advised in the guide) and found the error message that XBMC couldn't connect to the MySQL server.
Then I noticed the info in the guide for the MySQL Installation where they ask to check for "Enable root access from remote machines" which is different from the Amahi-MySQL-Setup.

To enable this feature I edited the configuration file /etc/mysql/my.conf where it says

Code: Select all

bind-address = 127.0.0.1
and replaced 127.0.0.1 with my server's IP address.

After that, XMBC successfully connected to my MySQL-Server and was able to create the database I entered in the advancedsettings.xml 8-)

Re: Using the built in MYSQL server to share XBMC library

Posted: Wed Jan 23, 2013 3:02 pm
by achmetinternet
I tried it but somehow it is not creating databases on my HDA.

EDIT: the issue in the debugging log of XBMC is that it cannot connect to the MySQL server on my IP. Then in brackets it states 111.

Re: Using the built in MYSQL server to share XBMC library

Posted: Thu Jan 24, 2013 7:01 am
by achmetinternet
Hi horigome,

I followed the guide from "howtogeeks" and at first it didn't work. Then I enabled Debugging in XBMC (like advised in the guide) and found the error message that XBMC couldn't connect to the MySQL server.
Then I noticed the info in the guide for the MySQL Installation where they ask to check for "Enable root access from remote machines" which is different from the Amahi-MySQL-Setup.

To enable this feature I edited the configuration file /etc/mysql/my.conf where it says

Code: Select all

bind-address = 127.0.0.1
and replaced 127.0.0.1 with my server's IP address.

After that, XMBC successfully connected to my MySQL-Server and was able to create the database I entered in the advancedsettings.xml 8-)
I got it working without changing the bind-address. Here is my wiki for my specific installation. Let me know if you think something is missing:

https://wiki.amahi.org/index.php/How_to ... al_devices

Re: Using the built in MYSQL server to share XBMC library

Posted: Thu Jan 24, 2013 7:24 am
by bigfoot65
Thanks for the contribution. I made a few changes. First, I moved your documentation to the existing XBMC wiki page. No sense in having 2.

https://wiki.amahi.org/index.php/XBMC#S ... spberry.29

Please take a look and see if your additions are still needed. This page has very similar documentation, so might be duplication. If not, please adjust as needed.

Re: Using the built in MYSQL server to share XBMC library

Posted: Fri Feb 01, 2013 2:32 am
by achmetinternet
Thanks for the contribution. I made a few changes. First, I moved your documentation to the existing XBMC wiki page. No sense in having 2.

https://wiki.amahi.org/index.php/XBMC#S ... spberry.29

Please take a look and see if your additions are still needed. This page has very similar documentation, so might be duplication. If not, please adjust as needed.
Will check.

Re: Using the built in MYSQL server to share XBMC library

Posted: Wed Sep 04, 2013 1:06 pm
by subzer0
this dont seem to work for ubunto

hda-create-user-and-db: command not found

Re: Using the built in MYSQL server to share XBMC library

Posted: Wed Sep 04, 2013 2:02 pm
by bigfoot65
Note the path location in the wiki.
https://wiki.amahi.org/index.php/Linux- ... t_Commands

I am running Ubuntu and works fine on my HDA. Check to see if it's located in that path and ensure you type it in manually, not copy and paste from the wiki.

Re: Using the built in MYSQL server to share XBMC library

Posted: Wed Jun 18, 2014 2:48 pm
by modem7
Hey guys, I know I'm resurrecting a dead thread, but where would I be able to locate the my.cnf file to change the bind-address? It seems I'm having some problems getting my openelec pi to write anything to the sql database