Description:
I create an account and grant some privileges to it in Master server. However in Slave server, the privileges lost.
How to repeat:
Master:
mysql> create user 'dbproxy108';
Query OK, 0 rows affected (0.00 sec)
mysql> grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,GRANT OPTION on *.* to 'dbproxy108'@'%';
Query OK, 0 rows affected (0.00 sec)
mysql> show grants for 'dbproxy108';
+-------------------------------------------------------------------------------------------------+
| Grants for dbproxy108@% |
+-------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON *.* TO `dbproxy108`@`%` WITH GRANT OPTION |
+-------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Slave:
mysql> show grants for 'dbproxy108';
+----------------------------------------------------------+
| Grants for dbproxy108@% |
+----------------------------------------------------------+
| GRANT USAGE ON *.* TO `dbproxy108`@`%` WITH GRANT OPTION |
+----------------------------------------------------------+
1 row in set (0.00 sec)
Suggested fix:
It influences master-slave switching when using the account 'dbproxy108'.
I suggest reporting an error when using 'GRANT OPTION' after 'GRANT' and before 'TO', only support 'WITH GRANT OPTION' clause.