| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
connection master; |
| 4 |
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; |
| 5 |
revoke select on *.* from 'user_foo'@'%'; |
| 6 |
select select_priv from mysql.user where user='user_foo' /* master:must be N */; |
| 7 |
Select_priv |
| 8 |
N |
| 9 |
connection slave; |
| 10 |
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; |
| 11 |
revoke select on *.* from 'user_foo'@'%'; |
| 12 |
select select_priv from mysql.user where user='user_foo' /* slave:must be N */; |
| 13 |
Select_priv |
| 14 |
N |
| 15 |
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass'; |
| 16 |
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */; |
| 17 |
Select_priv |
| 18 |
Y |
| 19 |
connection master; |
| 20 |
revoke select on *.* from 'user_foo'; |
| 21 |
select select_priv from mysql.user where user='user_foo' /* master:must be N */; |
| 22 |
Select_priv |
| 23 |
N |
| 24 |
connection slave; |
| 25 |
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */; |
| 26 |
Select_priv |
| 27 |
Y |
| 28 |
connection slave; |
| 29 |
revoke select on *.* FROM 'user_foo'; |
| 30 |
connection master; |
| 31 |
delete from mysql.user where user="user_foo"; |
| 32 |
connection slave; |
| 33 |
delete from mysql.user where user="user_foo"; |
| 34 |
include/rpl_end.inc |