0

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.

1 Answers1

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

Arenstar
  • 3,602
  • 2
  • 25
  • 34