2005-07-28 19:08:01 -06:00
|
|
|
stop slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
reset master;
|
|
|
|
reset slave;
|
|
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
|
|
start slave;
|
2008-05-26 15:06:49 +02:00
|
|
|
==== Create new replication user ====
|
|
|
|
[on master]
|
2008-04-07 16:36:21 +04:00
|
|
|
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY 'rpl';
|
2008-05-26 15:06:49 +02:00
|
|
|
[on slave]
|
2008-07-10 18:09:39 +02:00
|
|
|
include/stop_slave.inc
|
2008-07-06 19:07:30 +02:00
|
|
|
CHANGE MASTER TO master_user='rpl', master_password='rpl';
|
2008-07-10 18:09:39 +02:00
|
|
|
include/start_slave.inc
|
2008-05-26 15:06:49 +02:00
|
|
|
==== Do replication as new user ====
|
|
|
|
[on master]
|
2008-07-06 19:07:30 +02:00
|
|
|
CREATE TABLE t1 (n INT);
|
2008-04-07 16:36:21 +04:00
|
|
|
INSERT INTO t1 VALUES (1);
|
2008-05-26 15:06:49 +02:00
|
|
|
[on slave]
|
2008-04-07 16:36:21 +04:00
|
|
|
SELECT * FROM t1;
|
2005-07-28 19:08:01 -06:00
|
|
|
n
|
|
|
|
1
|
2008-05-26 15:06:49 +02:00
|
|
|
==== Delete new replication user ====
|
|
|
|
[on master]
|
2008-07-06 19:07:30 +02:00
|
|
|
DROP USER rpl@127.0.0.1;
|
2008-04-07 16:36:21 +04:00
|
|
|
FLUSH PRIVILEGES;
|
2008-05-26 15:06:49 +02:00
|
|
|
[on slave]
|
|
|
|
==== Restart slave without privileges =====
|
2008-07-10 18:09:39 +02:00
|
|
|
include/stop_slave.inc
|
2008-04-07 16:36:21 +04:00
|
|
|
START SLAVE;
|
2008-05-26 15:06:49 +02:00
|
|
|
==== Verify that Slave_IO_Running = No ====
|
|
|
|
Slave_IO_Running = No (should be No)
|
|
|
|
==== Cleanup (Note that slave IO thread is not running) ====
|
2008-04-07 16:36:21 +04:00
|
|
|
DROP TABLE t1;
|
2008-05-26 15:06:49 +02:00
|
|
|
[on master]
|
2008-04-07 16:36:21 +04:00
|
|
|
DROP TABLE t1;
|