2012-01-05, 18:54
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.
Once mysql is installed, run the mysql command line interface and run the following commands (note the ';' at the end, this is neccessary):
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:
***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.
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.
- 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)
- Run the MySQL installer
- Click Custom Installation
- Browse to the mysql directory you created and choose that for the install location
- Install mysql
- A popup will appear asking something to continue, click yes
- 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
- **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.
- 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.
- Here click standard configuration.
- It will ask you for the current password, leave this blank
- 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)
- 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.