MySQL Forums
Forum List  »  Replication

Exclude user modifications from replication
Posted by: Lucas van Braam van Vloten
Date: April 23, 2017 06:19AM

I am running a MySQL database that is replicated to multiple instances for various purposes.

I want to distinguish database users between Master and Slaves. Users that have access to the Master should not automatically have access to all replication Slaves. On some slaves I would like to configure users that do not have access to the Master.

To achieve this I have excluded database "mysql" from the replica. However, I noticed that user modification queries (CREATE USER, ALTER USER, DROP USER) are still replicated to the slave. If I create a user on the Master it will also be created on the Slave. And, more importantly, if I drop specific users from the Slave and not from the Master, and then modify the users on the Master, this will lead to a replication error. Also, creating a user on the Master that already exists on the Slave will lead to errors.

Is there a way to exclude all user modification queries from the replication?

Is it a good idea to exclude the entire MySql database from replication?

Options: ReplyQuote

Written By
Exclude user modifications from replication
April 23, 2017 06:19AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.