全部产品

RENAME USER

更新时间:2019-07-02 21:25:43

RENAME USER用于更改用户名。

语法

  1. RENAME USER old_user TO new_user
  2. [, old_user TO new_user] ...

示例

  1. RENAME USER account2 TO account_2;
  2. SELECT User, Host, Password FROM mysql.user;
  3. +----------+-----+----------------------- -+
  4. | User | Host| Password |
  5. +----------+-----+-------------------------+
  6. | account2 | % | *61f3777f02386598cda****|
  7. | account_2| % | *0fe79c07e168cabc99b****|