CREATE USER user1@localhost IDENTIFIED BY ''; GRANT ALL PRIVILEGES ON *.* TO user1@localhost; REVOKE SLAVE MONITOR ON *.* FROM user1@localhost; FLUSH PRIVILEGES; connect con1,localhost,user1,,; connection con1; SHOW GRANTS; Grants for user1@localhost GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user1`@`localhost` # # Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW SLAVE STATUS # Expected error: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation # SHOW SLAVE STATUS; ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation # # Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW RELAYLOG EVENTS # Expected error: Access denied; you need (at least one of) the REPLICA MONITOR # privilege(s) for this operation # SHOW RELAYLOG EVENTS; ERROR 42000: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation disconnect con1; # # SHOW SLAVE STATUS and SHOW RELAYLOG EVENTS are allowed with SLAVE MONITOR privilege # connection default; GRANT SLAVE MONITOR ON *.* TO user1@localhost; FLUSH PRIVILEGES; connect con1,localhost,user1,,; connection con1; SHOW GRANTS; Grants for user1@localhost GRANT ALL PRIVILEGES ON *.* TO `user1`@`localhost` SHOW SLAVE STATUS; SHOW RELAYLOG EVENTS; disconnect con1; connection default; DROP USER user1@localhost; # # MDEV-25030 Upgrade to 10.5.9 breaks root's ability to grant # insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version_id":100507,"plugin":"mysql_native_password","authentication_string":""}'), ('bar', 'foo8', '{"access":274877906943,"version_id":100508,"plugin":"mysql_native_password","authentication_string":""}'), ('bar', 'foo9', '{"access":274877906943,"version_id":100509,"plugin":"mysql_native_password","authentication_string":""}'); flush privileges; show grants for foo7@bar; Grants for foo7@bar GRANT ALL PRIVILEGES ON *.* TO `foo7`@`bar` WITH GRANT OPTION show grants for foo8@bar; Grants for foo8@bar GRANT ALL PRIVILEGES ON *.* TO `foo8`@`bar` WITH GRANT OPTION show grants for foo9@bar; Grants for foo9@bar GRANT ALL PRIVILEGES ON *.* TO `foo9`@`bar` WITH GRANT OPTION drop user foo7@bar, foo8@bar, foo9@bar; # # End of 10.5 tests #