GUIDE: How to use XBMC with MySQL on Mac OS X
#1
I've searched all over the internet for a single place that has an up to date guide on how to get MySQL working with XBMC 11 or 12 on Mac OS, and there just isn't one, so I thought I'd write one myself, with information gathered from multiple sources.

This definitely works.

Download MySQL from here: http://dev.mysql.com/downloads/mysql/.

Mount the downloaded .dmg, and inside you’ll find two .pkg and one .prefPane files. Double-click to install all three files on one of your Macs that you keep running 24/7.

Go to System Preferences -> MySQL, and click on “Start MySQL Server”. You’ll also want to tick to enable the “Automatically … on Startup” option.

Launch the Terminal app on your Mac and issue the following commands, one line at a time:

Quote:sudo /usr/local/mysql/bin/mysql

This will load up the MySQL command line interface. The type:

Quote:CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
Quote:GRANT ALL ON *.* TO 'xbmc';

DO NOT create any databases here yourself. That's the problem I had - loads of guides tell you to create databases for video and music, but they are OUT OF DATE. XBMC will create the databases for you.

Now, if you want other devices on your network to access the XBMC databases (which of course you do), then exit out of the MySQL command line interface by typing exit and type the following:

Quote:cd /usr/local/mysql/support-files/
Quote:sudo cp my-huge.cnf /etc/my.cnf

This creates the my.cnf file in the right place the MySQL needs. It's possible that your installation already has it, but mine didn't. Either way, the next thing you'll want to do is edit it. Type this:

Quote:cd /etc
Quote:sudo nano my.cnf

This will open the file for editing. You'll want to scroll down to the [mysqld] section and add in or edit (if it exists) the following line:

Quote:bind-address = ***.***.***.***

If you already have this entry, it will likely say 127.0.0.1 - this IP address is "localhost" and will only allow the machine itself to use the MySQL database. Change this to the IP address of your machine.

Save and exit, and reboot the machine (or just restart the MySQL service from the command line or from the System Pane you installed earlier).

Now, depending on what platform you are running your XBMC clients on (Linux, Windows, OS X, etc), the file you need to create next will need to be saved in different places.

Create (or add to, if you already have one) an advancedsettings.xml file:

Open up a plain text editor
Copy and paste the following text into a new text document:

Quote:<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
</advancedsettings>

Replace the two instances of ***.***.***.*** with the IP address of your Mac.
Save the file as advancedsettings.xml

Copy this advancedsettings.xml file you just created to the userdata folder of every XBMC install you want to sync with:

Windows XP: Documents and Settings\<your_user_name>\Application Data\XBMC\userdata\advancedsettings.xml
Vista/Windows 7: Users\<your_user_name>\AppData\Roaming\XBMC\userdata\advancedsettings.xml
Mac OS X: /Users/<your_user_name>/Library/Application Support/XBMC/userdata/advancedsettings.xml
iOS: /private/var/mobile/Library/Preferences/XBMC/userdata/advancedsettings.xml
Linux: $HOME/.xbmc/userdata/advancedsettings.xml

Now start up XBMC and it will create the required databases itself, and you should be good to go!

Enjoy!
Image
Reply


Messages In This Thread
GUIDE: How to use XBMC with MySQL on Mac OS X - by Rumik - 2013-01-11, 11:48
Logout Mark Read Team Forum Stats Members Help
GUIDE: How to use XBMC with MySQL on Mac OS X0