Debian Codegraph @

mysql-test/suite/group_replication/r/gr_group_consistency_privilege.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection server1]
6 include/start_and_bootstrap_group_replication.inc
7
8 # 1. Create user with SYSTEM_VARIABLES_ADMIN privilege to allow change
9 # globals variables
10 CREATE USER 'group_rpl_user' IDENTIFIED BY '';
11 GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO 'group_rpl_user';
12
13 # 2. Connect to server using group_rpl_user
14 [connection con_group_rpl_user]
15
16 # 3. Set group_replication_consistency at a global scope shall fail due
17 # to lack of privileges
18 SET @@GLOBAL.group_replication_consistency= BEFORE_ON_PRIMARY_FAILOVER;
19 ERROR 42000: Access denied; you need (at least one of) the SUPER or GROUP_REPLICATION_ADMIN privilege(s) for this operation
20
21 # 4. Set group_replication_consistency at a session scope shall succeed,
22 # do not need extra privileges
23 SET @@SESSION.group_replication_consistency= BEFORE_ON_PRIMARY_FAILOVER;
24
25 # 5. Grant GROUP_REPLICATION_ADMIN privileges to group_rpl_user
26 [connection default]
27 GRANT GROUP_REPLICATION_ADMIN ON *.* TO 'group_rpl_user';
28
29 # 6. Set group_replication_consistency at a global scope shall succeed
30 [connection con_group_rpl_user]
31 SET @@GLOBAL.group_replication_consistency= BEFORE_ON_PRIMARY_FAILOVER;
32
33 # 7. Cleanup
34 [connection default]
35 SET @@GLOBAL.group_replication_consistency= DEFAULT;
36 DROP USER group_rpl_user;
37 include/group_replication_end.inc