MySQL grant use?
der.hans
PLUGd at LuftHans.com
Fri Jul 23 18:01:05 MST 2010
Am 23. Jul, 2010 schwätzte Alex Dean so:
moin moin,
>> Also, how should I sync grants from master to slave when they're out of
>> sync?
>
> Dump the 'mysql' database on the master, and load it on the slave.
>
> If the slave has a different set of user accounts, I think you'll have to
> manually create what you want on the slave. In that case, configure the
> master to not replicate the 'mysql' database so your changes on the master
> won't affect the slave.
Yeah, slave has other stuff on it. As of yesterday, that include my test
DB for fixing all of this :).
Guess I'll write/find an audit script and run it once in a while.
>> In our case, the slave is also getting local changes. I'm pushing to stop
>> that, but haven't yet gotten it worked out. The local changes to the slave
>> didn't drop the missing grants, but since we've had emergency repairs
>> after local changes caused problems, it might be that the repairs did
>> cause the differences.
>
> Hm. Are users on the slave modifying tables which get replicated from the
> master? That's grandma's recipe for data stew. You can't do that if you
Yeah and yeah. I'm going to change that.
> have any interest in data integrity. If the slave has some tables which only
> exist on the slave, that's probably not a huge issue. If you want to
> describe the situation in a little more detail we can help comment further on
> how bad/not-bad it all is. :)
Engineering is doing some reporting off the slave. To do so, they've been
mucking with slave data. There was also some temporary restoral of old
data.
I will be moving all of that do a reporting DB and be moving them to
read-only access to the replicated DB. Had to get back from vacation
before I pushed for the change :).
ciao,
der.hans
--
# http://www.LuftHans.com/Classes http://www.TwoGeekTechs.com/
# Director of Engineering, FonWallet Transaction Solutions, Inc.
# In order to live free and happily, you must sacrifice boredom.
# It is not always an easy sacrifice.
More information about the PLUG-discuss
mailing list