[WINDOWS] [IOS] Sync Library between devices -- HowTO
#1
I'm not sure where to post this but I spent quite a few hours yesterday troubleshooting my setup and I'm now finally able to sync my ATV2 library with my Windows 7 Library. Installing MySQL proved to be much more complicated than it ought to be, plus the Windows Firewall needed to be configured and the databases needed to be removed.

I am posting this pseudo-guide in the hopes that someone else will find useful information and/or the information can be added to the HowTo Sync Wiki

Synching my ATV2 with my Windows 7 64-bit system (with thumbnails) proved to be extremely difficult. I am quite computer literate but I ran into quite a few bumps along the way that I did not find outlined anywhere, hopefully someone else will save themselves the headache of figuring this out on their own.

Please note that this very well may be applicable to other Windows installations, but for the purposes of my writeup it is in reference to Windows 7 64-bit.

I didn't take any pics because I tried so many different things until I was able to get it to work. If someone else wants to add pictures and make this their own guide feel free.

This guide assumes you have already setup SMB shares with your Windows machine and have your login credentials stored (they are stored if you have successfully added an SMB share)
Software/Setup used
Windows 7 64 with XBMC Eden 11
ATV2 with XBMC Eden 11
Mysql 5.5
WinSCP
2 Hard Drives

On your ATV2, or whichever device has your main library, go to settings and export your video library.

Add an inbound rule on your Windows firewall for TCP port 3306 -- Extremely important

Install Mysql
Download mysql for your OS (link)
I don't know if it is my hard drive or something else, but for the life of me I could not get mysql to install to my C: drive. So if you don't have a second drive feel free to try this on on your main drive but the installer would always hang for me.

  1. Create a directory on your 2nd drive called mysql (ie: D:\mysql) -- This step was important because the mysql installer did not seem to want to create the directory on its own. (Maybe this is why it wasn't installing on my C drive; I don't know since I never tried this way on my C drive after it hanging)
  2. Run the MySQL installer
  3. Click Custom Installation
  4. Browse to the mysql directory you created and choose that for the install location
  5. Install mysql
  6. A popup will appear asking something to continue, click yes
  7. At the end of the install another program starts up called MySqlConfigurator DO NOT RUN THIS. THERE IS A CHECKBOX THAT ASKS YOU TO START THE MYSQL CONFIGURATION -- UNCHECK THIS BOX AND CLICK FINISH
  8. **This was a critical step as the installer would always hang at this point. The configurator had to be run with administrator rights and this needs to be done manually.


  9. Navigate to your mysql directory (D:\mysql in this case) and go to the bin directory and right click the program MySQLInstanceConfig.exe and run this as administrator.


  10. Here click standard configuration.
  11. It will ask you for the current password, leave this blank
  12. Enter in the password for your database, and make sure to select 'allow remote root access' (or something along these lines, the checkbox under the password box) (Note: My understanding of MySQL is very limited, this might not be necessary)
  13. Now click next and execute the installation. If you get to this point you should be in the clear as far as getting mysql installed.

Once mysql is installed, run the mysql command line interface and run the following commands (note the ';' at the end, this is neccessary):

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

Some guides will tell you to also create the databases, DO NOT CREATE DATABASES HERE. Exit the CLI by typing exit.

Navigate to your Thumbnails directory on your Windows machine (for me it is C:\Users\USERNAME\AppData\Roaming\XBMC\userdata\Thumbnails) and share this Thumbnails folder and note it's path.


Back in the userdata folder create the following file called advancedsettings.xml and fill it with the following:

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>IP ADDRESS OF SQL SERVER MACHINE</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video2</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>IP ADDRESS OF SQL SERVER MACHINE</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_music2</name>
    </musicdatabase>

    <pathsubstitution>
      <substitute>
        <from>special://masterprofile/Thumbnails/</from>
        <to>smb:\\PATH TO SHARED THUMBNAILS DIRECTORY(THIS CAN BE VIEWED BY RIGHT CLICKING THUMBNAILS DIRECTORY THAT YOU SHARED, GOING TO THE SHARING TAB AND LOOKING AT THE NETWORK PATH, COPY EVERYTHING AFTER \\</to>
      </substitute>
    </pathsubstitution>
</advancedsettings>


***END OF XML FILE DO NOT INCLUDE***

Once you save this XML file open up WinSCP and login to your AppleTV 2 and navigate to the following directory:
/private/var/mobile/Library/Preferences/XBMC/userdata

Copy the advancedsettings.xml file to this directory

Now on whichever machine you backed up your video library (sorry do the same for your music directory if you had that setup as well, I didn't so I omitted that) and load up XBMC. Assuming it loads fine go to the settings tab and import the video database. If this step doesn't work mysql is probably not set up correctly and you will need to troubleshoot.

Once the database is done importing restart your appletv by holding the menu+down button for 5 seconds then releasing (or my preference ssh into the ATV2 and type killall -9 AppleTV) I prefer my method since it keeps your SSH session and WinSCP session active.

Assuming your AppleTV boots into XBMC correctly, everything should be all synched up and working now.
Reply
#2
Can't go forward without a password. I'll add a password and continue since I've had tons of issues trying to get this to work even on the local XBMC installation. But just wanted to bring that to light.

Image
Reply
#3
mrpink84 Wrote:Can't go forward without a password. I'll add a password and continue since I've had tons of issues trying to get this to work even on the local XBMC installation. But just wanted to bring that to light.

Image

This should be part of step 12.:
  • Enter in the password for your database, and make sure to select 'allow remote root access' (or something along these lines, the checkbox under the password box) (Note: My understanding of MySQL is very limited, this might not be necessary)

The screenshot you posted should only show if you don't cancel out of the configuration wizard the first time around, at least that was the case the countless times I tried to set this up. If you got it working then great; if you didn't get it working make sure you don't run the configuration wizard after installing MYSQL (by unchecking the box that asks you to run the configuration wizard and clicking finish). Then when you then start the configuration wizard with Admin Rights (Step 9.) you should see three boxes regarding passwords. One asks you for the current password (blank), and the other two asks you for a new password (similar to the screenshot you posted).

Did you get it working? My post was purely for outlining how to start the Configuration Wizard in admin mode as it was a necessary step for my installation.

It has come to my attention however that the MySQL windows installer is a much easier installer to use, I was using the Community Server (which this post is based from and requires admin rights -- the Windows installer does not need these steps).
ATV2 running XBMC Eden (Skin: Quartz3)
Windows 7 running XBMC Eden (custom setup as I'm basically running it as a service)
MySQL installed on Windows 7 for sharing libraries
iOS Specific FAQ | Alternative ATV2 keymap | Default ATV2 keymap
Post log files to Pastebin

Image
Reply

Logout Mark Read Team Forum Stats Members Help
[WINDOWS] [IOS] Sync Library between devices -- HowTO0