RENAME USER
用于更改用户名。
语法
RENAME USER old_user TO new_user
[, old_user TO new_user] ...
示例
RENAME USER account2 TO account_2;
SELECT User, Host, Password FROM mysql.user;
+----------+-----+----------------------- -+
| User | Host| Password |
+----------+-----+-------------------------+
| account2 | % | *61f3777f02386598cda****|
| account_2| % | *0fe79c07e168cabc99b****|
文档内容是否对您有帮助?