Req Split Database connections
#1
As I have a fairly large library with many devices in the house I prefer to use MySQL on a NAS, quite a common thing.

As the library is large I prefer to do my updates on my desktop MySQL installation and have the NAS operating as a slave. However, the slave keeps falling over because of updates with shows watched etc.

There are, of course, multiple solutions to this. I currently run the slave user with minimum privileges (DELETE, EXECUTE, SELECT, TRIGGER) but this removes bookmarks and watched statuses.

It would be nice if there could be a split of where reads and writes connect (as an option, of course)

It would be even nicer if we could have profiles (either within XBMC, or as user connections) where functional writes for watched statuses etc can be stored in user specific tables, rather than centrally. While I have played with doing this myself in the past, this doesn't help others and, of course, means having to track database changes.
Reply
#2
I am a bit confused as to what your issue is.

Is your NAS crashing due to MySQL queries done by the desktop ? If so, I would tackle this pretty large core issue first.
Reply
#3
No, slave replication fails when a write is performed on it..
Reply
#4
Ok i know understand you have set up replication between two mysql databases, and connect your other devices to the slave.
I have no clue why you would not just use the NAS as master, and do the updates directly to it.

What is the intended benefit of replicating the databases this way ?
Reply
#5
Because it's a very busy NAS and the library is quite large. Sadly, it doesn't have a hardware RAID chip so the CPU is quite high just on disk operations. Add any SQL indexing to it and the poor box is about ready to have a digital cardiac arrest.
Reply
#6
I'm sorry to say, but I don't think our devs will give MySQL some love anymore because they actually want to get rid of it in favor of a distributed model. But until that day it shouldn't be an issue to at least get patches in (unless they're not overly complicated and add much bloat to maintain) - so if one wants to give it a try, go ahead, but maybe do a early PR/RFC before spending too much time as it's possible that it will be rejected.
Reply

Logout Mark Read Team Forum Stats Members Help
Split Database connections0