1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
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 connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection master]
#
# TC1. Execute INSERT with and without the necessary
# privileges
# --------------------------------------------------
#
SET @@session.sql_log_bin = OFF;
CREATE TABLE t(c INT);
SET @@session.sql_log_bin = ON;
INSERT INTO t VALUES(10);
include/save_master_pos.inc
[connection slave]
SET GLOBAL partial_revokes = ON;
CALL mtr.add_suppression(".*command denied to user.");
CALL mtr.add_suppression(".*The replica coordinator and worker threads are stopped.*");
CREATE TABLE t(c INT);
GRANT INSERT ON *.* TO 'u1'@'localhost';
REVOKE INSERT ON test.* FROM 'u1'@'localhost';
SHOW GRANTS FOR 'u1'@'localhost';
Grants for u1@localhost
GRANT INSERT ON *.* TO `u1`@`localhost`
GRANT REPLICATION_APPLIER,SESSION_VARIABLES_ADMIN ON *.* TO `u1`@`localhost`
REVOKE INSERT ON `test`.* FROM `u1`@`localhost`
GRANT INSERT ON `mtr`.`test_suppressions` TO `u1`@`localhost`
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/wait_for_slave_sql_error.inc [errno=1142]
STOP SLAVE;
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
GRANT INSERT ON test.* TO 'u1'@'localhost';
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/sync_slave_sql.inc
REVOKE INSERT ON *.* FROM 'u1'@'localhost';
include/diff_tables.inc [master:t, slave:t]
DROP TABLE t;
[connection master]
SET @@session.sql_log_bin = OFF;
DROP TABLE t;
SET @@session.sql_log_bin = ON;
include/rpl_end.inc
|