Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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..

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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