rpl_do_grant.test

来自「这是linux下运行的mysql软件包,可用于linux 下安装 php + m」· TEST 代码 · 共 49 行

TEST
49
字号
# Test that GRANT and SET PASSWORD are replicated to the slavesource include/master-slave.inc;# do not be influenced by other tests.connection master;delete from mysql.user where user=_binary'rpl_do_grant';delete from mysql.db where user=_binary'rpl_do_grant';flush privileges;save_master_pos;connection slave;sync_with_master;# if these DELETE did nothing on the master, we need to do them manually on the# slave.delete from mysql.user where user=_binary'rpl_ignore_grant';delete from mysql.db where user=_binary'rpl_ignore_grant';flush privileges;# test replication of GRANTconnection master;grant select on *.* to rpl_do_grant@localhost;grant drop on test.* to rpl_do_grant@localhost;save_master_pos;connection slave;sync_with_master;show grants for rpl_do_grant@localhost;# test replication of SET PASSWORDconnection master;set password for rpl_do_grant@localhost=password("does it work?");save_master_pos;connection slave;sync_with_master;select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';# clear what we have done, to not influence other tests.connection master;delete from mysql.user where user=_binary'rpl_do_grant';delete from mysql.db where user=_binary'rpl_do_grant';flush privileges;save_master_pos;connection slave;sync_with_master;# no need to delete manually, as the DELETEs must have done some real job on# master (updated binlog)flush privileges;# End of 4.1 tests

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?