Skip navigation links

MySQL Forums :: Replication :: Replication fails on the mysql.tables_priv table


Advanced Search

Replication fails on the mysql.tables_priv table
Posted by: Rogier van Staveren ()
Date: January 11, 2013 05:25AM

Hi,

We have configured a master-master configuration using MySQL 5.5.27 and are experiencing a problem when assigning table privileges to users.

This is wat goes wrong:
Master-master configuration has 2 nodes, mysql1.example.com and mysql2.example.com

MySQL administrator has a wildcard in hostname:
On mysql1.example.com
mysql -u root -p
CREATE USER 'adminuser'@'admin%.example.com' IDENTIFIED BY '******';
GRANT ALL PRIVILEGES ON *.* TO 'adminuser'@'admin%.example.com' WITH GRANT OPTION;
FLUSH PRIVILEGES;

MySQL administrator creates a user from host admin1.example.com:
mysql -h mysql1.example.com -u testuser -p
CREATE USER 'testuser'@'localhost';
GRANT USAGE ON *.* TO 'testuser'@'localhost';
GRANT SELECT ON `test`.`test` TO 'testuser'@'localhost';
FLUSH PRIVILEGES;

This adds a row to the mysql.tables_priv table
SELECT * FROM `mysql`.`tables_priv`\G
*************************** 1. row ***************************
Host: localhost
Db: test
User: testuser
Table_name: test
Grantor: adminuser@admin%.example.com
Timestamp: 2013-01-11 03:29:39
Table_priv: Select
Column_priv:

MySQL replication replicates the user to the other node, when looking up the changes on this other node this is what I get:
mysql -h mysql2.example.com -u testuser -p
SELECT * FROM `mysql`.`tables_priv`\G
*************************** 1. row ***************************
Host: localhost
Db: test
User: testuser
Table_name: test
Grantor: adminuser@admin1.example.com
Timestamp: 2013-01-11 03:29:39
Table_priv: Select
Column_priv:

As you can see the grantors hostname is changed, the wildcard is replaced!

Is this a bug in MySQL replication, are we doing something wrong?

Options: ReplyQuote


Subject Views Written By Posted
Replication fails on the mysql.tables_priv table 915 Rogier van Staveren 01/11/2013 05:25AM
Re: Replication fails on the mysql.tables_priv table 382 Rick James 01/12/2013 06:23PM


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.