Kodi Community Forum

Full Version: [AppleTV1] MySQL Server on Apple TV?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am currently running Dharma on my 1st Gen Apple TV and love it. So much so, that I was thinking of picking up a second 1st gen Apple TV to set up a second XBMC for another room. This got me to wonding about sharing my library across the 2 Apple TVs on the network, and it sounds like it can be done easily using MySQL Server.

I know I could run it from my PC, but that would require me to keep it on all the time. Since it sounds like a jet on a takeoff roll, I only turn it on when I need to. My Apple TV, on the other hand, is on all the time and runs silently.

My question is: is it possible to install and run MySQL server from an Apple TV and share your library from that machine? If it is not possible with the stripped down Mac OS on the 1st Gen ATVs, would it be possible to run it on an Apple TV that has been turned into a Linux machine using the Crystalbuntu disk image that Sam Nazarko puts out?

I know nothing about either Linux or MySQL, so forgive me if this is a stupid question. I am trying to find an easy way to run a whole house library without needing to buy a newer, quieter PC to run 24/7 as a server. I was particularly intrested in the 1st gen Apple TV angle since you can pick them up for under $75 on Ebay. Any thoughts or help is appreciated.

Thanks,
L.B.
as long as your running pure linux on the aTV you can absolutely run mySQL , if your still using OSx I"m not sure (know nothing about OSx)

.. where is your media stored currently ? ..
I don't see any reason why you couldn't. Mysql is very easy to work with. Basically you just need to install the sql server and mysql, then configure xbmc to use Mysql instead of the build in SQLite

You could use either the package installer, or install with Homebrew

Also, I'd checkout lifehacker's post on synchronizing with mysql
Technically I don't see any reason why it wouldn't work (especially if you're running one of the Linux distros on your ATV like me), but you'll be spending a lot of the available RAM on it. The ATV is pretty tight as it is (especially if you're running HD video), so I don't know if you'll get away with it without affecting your playback.

Interesting idea though. I have a server running in my attic, so running MySQL on that would be trivial, and I could point my ATV at that (plus any other XBMCs I add later). It carries all of my media and runs my Squeezeboxes, so it's on all the time anyway.

If you're getting another ATV anyway, I'd test it on the new one, to save disrupting the system you already have working.
Yeah it'll work. I've setup LAMP on an aTV before.
Thanks all for the info. I will have to figure out how to actually install it on the Apple TV. Again, this is something that I have no experience with whatsoever.

Currently, all my library folders are on a usb hard drive attached to a Time Capsule. This shouldn't present an issue should it?

If anyone can point me toward a good guide for this process, if they exist, I would really appreciate it.

Thanks again,
L.B.
Lifehacker had something similar on this:

http://lifehacker.com/5634515/how-to-syn...-the-house
Lifehacker doesn't mention configuring mysql with network access though :/
Be careful with that. MySQL eats RAM like its candy.
I've set up mySQL on my living room atv using http://wiki.awkwardtv.org/wiki/XAMMP_-_A.../PHP5/Perl & http://www.apachefriends.org/en/xampp-macosx.html as a crutch.

For the OS 10.4 install, the 0.9.4 version is recommended. Or is it 0.7.2 for XAMMP...cant remember. http://sourceforge.net/projects/xampp/fi...20X/0.7.2/

http://sourceforge.net/projects/xampp/fi...MPP/0.9.4/

I had it up and running in about 30min-1hr. Now my 2 atv + iMac all sync libraries. I need to check to see how much ram it is taking up though, I'll just move it to the iMac then.
FlightSR, Once you had it installed, were you able to use the lifehacker guide to set it up or did you have to do it another way? I don't know a thing about mySQL, so any details you can offer are appreciated.

Thanks.
Ok, I was able to get XAMPP up and running on one of my apple tv units, but now I am kind of at a deadlock. It is running and I can access it form other computers, but I have no idea how to set it up to sync my libraries. I tried to follow the lifehacker guide, but it seems like it is designed to be set up from a command line. Since the XAMPP MySQL is web based, I am at a loss as to how to set it up. I think I created an xbmc_video database, but I can't tell. i also couldn't see a way to supply a username and password for xbmc to use to get access to the database. Another issue, I can't seem to figure out how to get XAMPP to start on bootup with the apple tv. I keep having to use the terminal on my mac to launch it. Wort of all, when I rebooted my remote apple tv, the library was wiped and I had to rebuild it!

I found a guide at this site: http://www.darkmercury.net/site/installi...r_appletv/
that I used to get XAMPP on there, but the bit about creating the launchagent didn't seem to work. Neither did the bootup guide on the awkwardtv wiki.
If anyone can baby step me through this, I would really appreciate it. i have been pulling my hair out for a couple weeks to no avail.

Thanks,
L.B.
Sorry for the delay, need to change my notification settings. Once you have the mysql setup, I followed the lifehacker instructions. To get your libraries to sync, you have to edit your Advancedsettings.xml file like http://forum.xbmc.org/showpost.php?p=646798&postcount=4.

The boot thing is a bitch, that took me a while to figure out. You have to create a .plist file and use launchd to schedule it to run. I am away from my appletv, but i when i get home i will post my plist file and where its located.
lbbeurmann Wrote:Since the XAMPP MySQL is web based, I am at a loss as to how to set it up.

I set up my XAMPP mysql using command line only. http://www.apachefriends.org/en/xampp-macosx.html#876.

Just create your libraries, set users and permissions the way lifehacker said, then edit your advanced settings file.
Thanks for all the assistance. I have them syncing now and everything seems to be working ok. I do notice that the xbmc ui seems to have a little lag to it now and it takes a minute for xbmc to launch from the apple tv ui where it was pretty quick before. I'm looking forward to seeing your autoboot solution. I also noticed that there is a way to start only the mysql portion of xampp. Do you think that this might speed things up a little?
Pages: 1 2