include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
CREATE TABLE t1 (a INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
include/sync_slave_sql_with_master.inc
#
# Bug 84350: Error 1290 executing flush logs in read-only slave
#
CREATE USER 'reload_user'@'localhost';
GRANT RELOAD ON *.* TO 'reload_user'@'localhost';
SET @saved_read_only= @@GLOBAL.read_only;
SET GLOBAL read_only= ON;
# slave reload_user connection
FLUSH LOGS;
INSERT INTO t1 VALUES (2);
include/sync_slave_sql_with_master.inc
FLUSH BINARY LOGS;
#
# Bug 84437: super-read-only does not allow FLUSH LOGS on 5.7
#
# slave root connection
SET @saved_super_read_only= @@GLOBAL.super_read_only;
SET GLOBAL super_read_only=ON;
INSERT INTO t1 VALUES (3);
include/sync_slave_sql_with_master.inc
FLUSH LOGS;
INSERT INTO t1 VALUES (4);
include/sync_slave_sql_with_master.inc
FLUSH BINARY LOGS;
DROP TABLE t1;
include/sync_slave_sql_with_master.inc
SET GLOBAL super_read_only= @saved_super_read_only;
SET GLOBAL read_only= @saved_read_only;
DROP USER reload_user@localhost;
include/rpl_end.inc
