RENAME USER

    RenameUserStmt

    UserToUser

    Username

    1. CREATE USER 'newuser' IDENTIFIED BY 'mypassword';
    1. Query OK, 1 row affected (0.02 sec)
    1. +-------------------------------------+
    2. +-------------------------------------+
    3. +-------------------------------------+
    4. 1 row in set (0.00 sec)
    1. RENAME USER 'newuser' TO 'testuser';
    1. SHOW GRANTS FOR 'testuser';
    1. +--------------------------------------+
    2. +--------------------------------------+
    3. | GRANT USAGE ON *.* TO 'testuser'@'%' |
    4. +--------------------------------------+
    5. 1 row in set (0.00 sec)
    1. ERROR 1141 (42000): There is no such grant defined for user 'newuser' on host '%'

    语句与 MySQL 完全兼容。如发现任何兼容性差异,请在 GitHub 上提交 。