I have configured mysql to replicate itself to another DB server. Through my testing of this setup, it appears that the slave can have values changed manually in the replicated databases.

Is there a way to disable any changes on the slave databases, without disabling the slave server from working? I basically want it set so the slave service is the only thing able to change anything on the DB.

thanks in advance.

link|improve this question
feedback

1 Answer

It is possible to set the slave to read-only ( whereby it only listens to the replication thread)

using http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_read_only

"When it is enabled, the server permits no updates except from users that have the SUPER privilege or (on a slave server) from updates performed by slave threads"

mysql> SET GLOBAL read_only = ON;

Note: Root user can still write..

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.