This MariaDB tutorial explains how to use the MariaDB RENAME USER statement with syntax and examples.
The RENAME USER statement is used to rename a user in the MariaDB database.
The syntax for the RENAME USER statement in MariaDB is:
The name of the user to rename in the MariaDB database.
The new name to assign to the user.
Let's look at how to rename a user in MariaDB using the RENAME USER statement.
For example:
In this example, the RENAME USER statement would rename the user called AODBA to dbd in the MariaDB database.
How can you rename more than one user at a time in MariaDB? You can use the RENAME USER statement to rename multiple users by comma separating the user name values.
For example:
This RENAME USER example would rename two users in MariaDB. The first user called AODBA would be renamed to dbd and the second user called checkyoursite would be renamed to cym.