RENAME USER
RenameUserStmt
UserToUser
Username
CREATE USER 'newuser' IDENTIFIED BY 'mypassword';
Query OK, 1 row affected (0.02 sec)
+-------------------------------------+
+-------------------------------------+
+-------------------------------------+
1 row in set (0.00 sec)
RENAME USER 'newuser' TO 'testuser';
SHOW GRANTS FOR 'testuser';
+--------------------------------------+
+--------------------------------------+
| GRANT USAGE ON *.* TO 'testuser'@'%' |
+--------------------------------------+
1 row in set (0.00 sec)
ERROR 1141 (42000): There is no such grant defined for user 'newuser' on host '%'
语句与 MySQL 完全兼容。如发现任何兼容性差异,请在 GitHub 上提交 。