Bug #84027 | Issues with renaming root user. | ||
---|---|---|---|
Submitted: | 1 Dec 2016 11:42 | Modified: | 20 Oct 2017 19:02 |
Reporter: | Kapil Singla | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S2 (Serious) |
Version: | 8.0.0-dmr | OS: | Debian (Debian GNU/Linux 8.2 (jessie)) |
Assigned to: | CPU Architecture: | Any | |
Tags: | rename, rename command, user rename |
[1 Dec 2016 11:42]
Kapil Singla
[1 Dec 2016 11:54]
Kapil Singla
I have tested all these steps in MySQL 5.7.16 and it all works well. However, MySQL 8.0.0-dmr is an issue.
[1 Dec 2016 21:54]
MySQL Verification Team
Thank you for the bug report. Different behavior between 5.7 and 8.0: c:\dbs>c:\dbs\5.7\bin\mysql -uroot --port=3570 -p --prompt="mysql 5.7 > " Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.7.18 Source distribution PULL: 2016-NOV-20 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.7 > rename user 'root'@'localhost' to 'master'@'localhost'; Query OK, 0 rows affected (0.10 sec) mysql 5.7 > use test Database changed mysql 5.7 > show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | | test | | test_db | +--------------------+ 6 rows in set (0.00 sec) c:\dbs>c:\dbs\8.0\bin\mysql -uroot --port=3580 -p --prompt="mysql 8.0 > " Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 8.0.1-dmr Source distribution PULL: 2016-NOV-20 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 8.0 > rename user 'root'@'localhost' to 'master'@'localhost'; Query OK, 0 rows affected (0.06 sec) mysql 8.0 > use test Database changed mysql 8.0 > show databases; ERROR 1449 (HY000): The user specified as a definer ('root'@'localhost') does not exist
[19 May 2017 10:19]
Kapil Singla
Is there any progress on this now?
[19 May 2017 11:06]
Ståle Deraas
Posted by developer: Hi Kapil, We have a plan for how to handle it, and this will be fixed before 8.0 goes GA. Do you have a special concern or need around this issue, just so I can understand more about your interest?
[20 Oct 2017 19:02]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.4 release, and here's the changelog entry: After the MySQL root user account was renamed, a query that accessed an INFORMATION_SCHEMA view returned an error stating that the user specified as the definer does not exist. To avoid this error, a new system user account, 'mysql.infoschema'@'localhost', is now the DEFINER for INFORMATION_SCHEMA views. Reference manual update: https://dev.mysql.com/doc/refman/8.0/en/reserved-users.html