Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5.2
-
None
Description
If I run this mtr test:
-- source include/mysql_upgrade_preparation.inc
|
-- source include/have_working_dns.inc
|
-- source include/have_innodb.inc
|
-- source include/have_partition.inc
|
let $MYSQLD_DATADIR= `select @@datadir`; |
|
--source include/switch_to_mysql_user.inc
|
DROP VIEW mysql.user_bak; |
FLUSH PRIVILEGES; |
SHOW GRANTS FOR root@localhost; |
|
--echo # mysql_upgrade --force --silent 2>&1
|
--exec $MYSQL_UPGRADE --force --silent 2>&1
|
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
FLUSH PRIVILEGES; |
SHOW GRANTS FOR root@localhost; |
|
DROP TABLE mysql.global_priv; |
RENAME TABLE mysql.global_priv_bak TO mysql.global_priv; |
FLUSH PRIVILEGES; |
SHOW GRANTS FOR root@localhost; |
it produces the following output:
DROP VIEW mysql.user_bak;
|
FLUSH PRIVILEGES;
|
SHOW GRANTS FOR root@localhost;
|
Grants for root@localhost
|
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
# mysql_upgrade --force --silent 2>&1
|
FLUSH PRIVILEGES;
|
SHOW GRANTS FOR root@localhost;
|
Grants for root@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, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
DROP TABLE mysql.global_priv;
|
RENAME TABLE mysql.global_priv_bak TO mysql.global_priv;
|
FLUSH PRIVILEGES;
|
SHOW GRANTS FOR root@localhost;
|
Grants for root@localhost
|
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
Notice, the user root@localhost has ALL PRIVILEGES before the upgrade, but it misses the REPLICATION MASTER ADMIN after the upgrade.
Looks wrong. REPLICATION MASTER ADMIN should be automatically granted somehow.
Attachments
Issue Links
- is duplicated by
-
MDEV-22091 REVOKE ALL is not allowed for root
- Closed
- relates to
-
MDEV-21743 Split up SUPER privilege to smaller privileges
- Closed