MySQL Unprivileged Users
By default, the tungsten user needs to be given SUPER privileges within MySQL so that the user can apply, create and access
all the tables and data within the MySQL database. In some situations, this level of access is not available within the MySQL environment, for example,
when using a server that is heavily secured, or managed cloud instance such as Amazon Aurora.
For this situation, Tungsten can be configured to use an 'unprivileged' user configuration. This configuration does not require the
SUPER privilege, but instead needs explicit privileges on the schema created by Tungsten Replicator, and on the schemas that it will
update when applying events.
The capability can be enabled by using the following two options and behaviors:
When privileged_master is disabled:
A Primary replicator will not attempt to suppress binlog writes during operations.
A Primary replicator will not issue a
FLUSH LOGScommand when the replicator starts.The current replicator position is not updated within the trep_commit_seqno table.
The
tungstenuser that connects to the database must be configured to work with the MySQL service using the following grants:mysql> GRANT ALL ON tungsten_alpha.* to tungsten@'%' IDENTIFIED BY 'secret';mysql> GRANT SELECT ON *.* TO tungsten@'%' IDENTIFIED BY 'secret';mysql> GRANT REPLICATION SLAVE ON *.* TO tungsten@'%' IDENTIFIED BY 'secret';mysql> REVOKE SUPER ON *.* FROM tungsten@'%';When privileged_slave is disabled:
The current replicator position is not updated within the trep_commit_seqno table.
The replicator will not attempt to suppress binlog writes during relay operations.
mysql> GRANT ALL ON tungsten_batch.* to tungsten@'%' IDENTIFIED BY 'secret';mysql> GRANT SELECT,INSERT,UPDATE ON *.* TO tungsten@'%' IDENTIFIED BY 'secret';mysql> GRANT REPLICATION SLAVE ON *.* TO tungsten@'%' IDENTIFIED BY 'secret';mysql> REVOKE SUPER ON *.* FROM tungsten@'%';Optionally,
INSERTandUPDATEprivileges can be explicitly added to the user permissions for the tables/databases that will be updated during replication.