MySQL: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 20: Line 20:


==Setting up XBMC==
==Setting up XBMC==
#Open XBMC on the computer that has the library you want to share (If you have not created a library yet you can skip to X)
{| class=infobox
#Export the Video Library by doing the following:
| advancedsettings.xml:
##Go to '''System/Settings -> Video -> Library''' and select '''Export library'''
|-
##Select '''Single file'''
|
#Export the Music Library by doing the following:
##Go to '''System/Settings -> Music -> Library''' and select '''Export library'''
##Select '''Single file'''
#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:
<pre><advancedsettings>
<pre><advancedsettings>
     <videodatabase>
     <videodatabase>
Line 49: Line 43:
     </musicdatabase>
     </musicdatabase>
</advancedsettings></pre>
</advancedsettings></pre>
|}
#Open XBMC on the computer that has the library you want to share (If you have not created a library yet you can skip to X)
#Export the Video Library by doing the following:
##Go to '''System/Settings -> Video -> Library''' and select '''Export library'''
##Select '''Single file'''
#Export the Music Library by doing the following:
##Go to '''System/Settings -> Music -> Library''' and select '''Export library'''
##Select '''Single file'''
#Create (or add to, if you already have one) an advancedsettings.xml file:
##Open up a plain text editor
##Copy and paste the text from the right-hand box into a new text document
##Replace the two instances of <code><host>***.***.***.***</host></code> with local network IP address of your MySQL server
##Save the file as '''advancedsettings.xml'''
##Save the file as '''advancedsettings.xml'''




[[Category:How-to]]
[[Category:How-to]]

Revision as of 00:38, 14 November 2011

Notice: These instructions require the latest nightly build of XBMC (pre-Eden v11)

Into about what this is and how cool it is to sync XBMC libraries goes here

Selecting a server

Something about needing to choose which of your XBMC boxes (or NAS box) will be the MySQL server. Needs to be on 24/7 or have wake-on-lan (preferably the former), needs to have a static local IP, etc.

Setting up the MySQL server

  1. Download a copy of MySQL server for your OS: http://dev.mysql.com/downloads/mysql/
  2. Run the installer and select the Standard configuration
  3. Create a password when asked
  4. Select that you want the database to have network access
  5. Get into the MySQL command line interface.
    Windows: Open the "MySQL Command Line Client" from the MySQL start menu
    1. Type in: CREATE USER 'xbmc' IDENTIFIED BY 'xbmc'; and press return
    2. Type in: CREATE database xbmc_video; and press return
    3. Type in: CREATE database xbmc_music; and press return
    4. Type in: GRANT ALL ON *.* TO 'xbmc'; and press return
  6. Close out the command line tool

Setting up XBMC

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

    <musicdatabase>
        <type>mysql</type>
        <host>***.***.***.***</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_music</name>
    </musicdatabase>
</advancedsettings>
  1. Open XBMC on the computer that has the library you want to share (If you have not created a library yet you can skip to X)
  2. Export the Video Library by doing the following:
    1. Go to System/Settings -> Video -> Library and select Export library
    2. Select Single file
  3. Export the Music Library by doing the following:
    1. Go to System/Settings -> Music -> Library and select Export library
    2. Select Single file
  4. Create (or add to, if you already have one) an advancedsettings.xml file:
    1. Open up a plain text editor
    2. Copy and paste the text from the right-hand box into a new text document
    3. Replace the two instances of <host>***.***.***.***</host> with local network IP address of your MySQL server
    4. Save the file as advancedsettings.xml