2011-09-14 16:10:18 +02:00
|
|
|
include/master-slave.inc
|
|
|
|
[connection master]
|
2016-03-25 17:51:22 +01:00
|
|
|
connection slave;
|
2011-09-14 16:10:18 +02:00
|
|
|
include/stop_slave.inc
|
2016-03-25 17:51:22 +01:00
|
|
|
connection master;
|
2011-09-14 16:10:18 +02:00
|
|
|
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
|
|
|
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
|
|
|
FLUSH PRIVILEGES;
|
2016-03-25 17:51:22 +01:00
|
|
|
connection slave;
|
2011-09-16 14:35:25 +02:00
|
|
|
CHANGE MASTER TO
|
|
|
|
MASTER_USER= 'plug_user',
|
|
|
|
MASTER_PASSWORD= 'plug_user';
|
2011-09-14 16:10:18 +02:00
|
|
|
include/start_slave.inc
|
2016-03-25 17:51:22 +01:00
|
|
|
connection master;
|
|
|
|
connection slave;
|
2011-09-14 16:10:18 +02:00
|
|
|
# Slave in-sync with master now.
|
|
|
|
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
2018-11-24 14:13:41 +01:00
|
|
|
User plugin authentication_string
|
2011-09-14 16:10:18 +02:00
|
|
|
plug_user test_plugin_server plug_user
|
|
|
|
# Cleanup (on slave).
|
|
|
|
include/stop_slave.inc
|
|
|
|
CHANGE MASTER TO MASTER_USER='root';
|
|
|
|
DROP USER 'plug_user';
|
|
|
|
# Cleanup (on master).
|
2016-03-25 17:51:22 +01:00
|
|
|
connection master;
|
2011-09-14 16:10:18 +02:00
|
|
|
DROP USER 'plug_user';
|
|
|
|
include/rpl_end.inc
|