The syntax for the RENAME USER statement in MySQL is:
Parameters or Arguments
The name of the user to rename in the MySQL database.
The new name to assign to the user.
Let's look at how to rename a user in MySQL using the RENAME USER statement.
In this example, the RENAME USER statement would rename the user called ao to jane in the MySQL database.
Rename more than one user
How can you rename more than one user at a time in MySQL? You can use the RENAME USER statement to rename multiple users by comma separating the user name values.
This RENAME USER example would rename two users in MySQL. The first user called ao would be renamed to jane and the second user called andersonk would be renamed to kyle.