Shared database on a NAS without MySQL
#1
Question 
I now have 2 Apple TV 2's and a NAS for my media. I don't want a PC running to function as a MySQL server (maybe in the future). All the guides about shared databases I can find talk about MySQL databases. The thumbnails are already hosted on the NAS with pathsubstitution. I followed the instructions from the XBMC Wiki but I can't for the life of me figure out what I'm doing wrong:

Code:
<videodatabase>
  <type>sqlite3</type>
  <host>smb://xbmc:xbmc@prometheus/xbmc/Database</host>
  <name>MyVideos34</name>
</videodatabase>

XBMC just ignores the "host" part. Even if I put in a local path like: <host>/User/Library/Preferences/XBMC</host> it ignores it. The weird thing is that if I change the "name" part XBMC creates a new database with that name in .../Preferences/XBMC/userdata/Database. I also tried pathsubstitution on the database folder but that doesn't work at all and only results in a bunch of errors in the log file and I rather use the official videodatabase method.
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#2
As far as i can see in the code it is not possible. The sqlite interface doesn't support network pathes. It just supports local filesystem - and since the appletv2 is not able to mount a smb share into the filesystem, this all is impossible.

But maybe your NAS is "hackable" and you could get mysql running on it? (my nas is a seagate dockstar which i installed openwrt on ... so it has the mysql onboard which also disables the need of letting a pc running).
Reply
#3
Memphiz Wrote:As far as i can see in the code it is not possible. The sqlite interface doesn't support network pathes. It just supports local filesystem - and since the appletv2 is not able to mount a smb share into the filesystem, this all is impossible.

But maybe your NAS is "hackable" and you could get mysql running on it? (my nas is a seagate dockstar which i installed openwrt on ... so it has the mysql onboard which also disables the need of letting a pc running).
But even if I put in a local path in the <host> (on my Mac or on the ATV2) like /User on the ATV2 or /Users/Bart/Desktop on my Mac XBMC still ignores it. I know it reads the Advancedsettings.xml and the <videodatabase> part in it because a change in the <name> part is not being ignored. Like i said in the first post. If I change the name part XBMC just creates a new DB with that name.

I don't think the Drobo FS (my NAS) is hackable to run MySQL.
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#4
Ditto on the hacking NAS option. I've got a Dlink DNS 323 with funplug hack providing me all sorts of useful toys including MySQL server functionality.
Image Don't even think about my mother!
Reply
#5
Yeah your right ... found it and will try to fix it ... nevertheless - using a remote share for the sqlite db is not possible on appletv2g ...
Reply
#6
Memphiz Wrote:Yeah your right ... found it and will try to fix it ... nevertheless - using a remote share for the sqlite db is not possible on appletv2g ...
Ok thanks for your quick response, that's a bummer. But I found a dev who is porting MySQL as a DroboApp the the Drobo FS, but it's a WIP: http://drobo.jhah.net/apps/start

He has SQLite already running on the Drobo FS, is that some help to me?
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#7
Not really since sqlite has no network interfaceing. I've fixed the bug which ignores the db path from advancedsettings.xml and send a patch to davilla though.

Hopefully the DroboApp will be finished soon, for fixing your problem Smile
Reply
#8
I just edited my previous post to include a new question but you already replied. So I moved the question to this new post.

Is there a reason pathsubstitution on the database folder shouldn't work?
Code:
<substitute>
  <from>special://masterprofile/Database</from>
  <to>smb://xbmc:xbmc@prometheus/xbmc/Database/</to>
</substitute>
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#9
Just had a quick google about MySQL on the Drobo FS. Although it clearly doesn't exist right now, it looks like someone might have a MySQL Drobo App on their to do list:

http://drobo.jhah.net/apps/start

You'd probably have to sign up to the Drobo community forum to be sure that this set of projects is still alive though (there's no dates on the webpage I pointed to in the link above)
Reply
#10
procrastinator Wrote:Just had a quick google about MySQL on the Drobo FS. Although it clearly doesn't exist right now, it looks like someone might have a MySQL Drobo App on their to do list:

http://drobo.jhah.net/apps/start

You'd probably have to sign up to the Drobo community forum to be sure that this set of projects is still alive though (there's no dates on the webpage I pointed to in the link above)
I found that site to, see four posts up. I also read somewhere that the Drobo FS hasn't got much resources left so a MySQL port may not be even possible.
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#11
Cyzor Wrote:I found that site to, see four posts up. I also read somewhere that the Drobo FS hasn't got much resources left so a MySQL port may not be even possible.

Whoops, sorry about that! don't know how I missed it! Rolleyes It's a shame that they seem to have under-powered it; it looks like a nice little box. I'm hoping to set up a MySQL database on my ReadyNAS Duo when I eventually get time to do so.

Fingers-crossed that the DroboApp works out
Reply
#12
procrastinator Wrote:Fingers-crossed that the DroboApp works out
Yeah, but I don't think it's gonna happen but I keep on hoping:

Quote form the Drobo Forums:
Quote:I have not had one long but from what I can tell is it runs a version of BusyBox linux I think which is an running on an ARM based CPU. As far as I know there is no easy mysql build for ARM based systems short of compiling it for cross platforms."
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#13
Note that sqlite cannot read from network sources (it's file routines aren't wrapped) so this would be a no-go. While this could be done (see the vfs component in sqlite3) I personally think it's a bad idea, as in general sqlite isn't really designed for multiple access, which is the obvious next step when the database is sitting on a shared folder.

It'd be better to invest time in a more useful backend for this sort of thing (eg sqlite3 + webserver/upnp to serve the content.)

Setting the database path for sqlite via advancedsettings.xml is IMO asking for problems. I'll clarify the wiki page.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#14
jmarshall Wrote:Note that sqlite cannot read from network sources (it's file routines aren't wrapped) so this would be a no-go. While this could be done (see the vfs component in sqlite3) I personally think it's a bad idea, as in general sqlite isn't really designed for multiple access, which is the obvious next step when the database is sitting on a shared folder.

It'd be better to invest time in a more useful backend for this sort of thing (eg sqlite3 + webserver/upnp to serve the content.)

Setting the database path for sqlite via advancedsettings.xml is IMO asking for problems. I'll clarify the wiki page.

Cheers,
Jonathan
Thanks for the info! But in my case I would never (never say never I know) acces the DB from more than one place. Just to have one DB would be awesome. No more updating in more than one place, the ability to continue watching in a different room...

I see you edited the Wiki with "..on any non-local (as far as XBMC is concerned) paths." When I use pathsubstitution to redirect to a network share it is a local path as far as XBMC is concerned right? I noted your concernes about multiple acces but would this work in theory?
Code:
<pathsubstitution>
  <substitute>
    <from>special://masterprofile/Database</from>
    <to>smb://xbmc:xbmc@prometheus/xbmc/Database/</to>
  </substitute>
</pathsubstitution>

Or I could just buy a 1-bay QNAP with MySQL support like this one. Other suggestions?
XBMC on Mac and 2 Apple TV 2's – Alaska Revisited – Drobo FS
Reply
#15
as i sad in post #2 this will not work. The only thing is, that xbmc would translate the pass to the smb:// thing and this substituted path would be given to sqlite which only can handle local pathes... that is the fact.
Reply

Logout Mark Read Team Forum Stats Members Help
Shared database on a NAS without MySQL0