MariaDB rename account
Hello colleagues.
In today's article, I want to tell you about how to rename a user account in MariaDB. There is a situation when you created an account for someone, assigned rights, and an hour later the person tells you that the account name does not suit him.
Article content:
- A list of users.
- Rename account.
1. A list of users.
All users are stored in the mysql.user table.
mariadb> SELECT USER, HOST FROM mysql.user;
2. Rename account.
You can rename an account in MariaDB using the RENAME USER command. Let's change the ruslan account to maks.
mariadb> RENAME USER 'ruslan'@'localhost' TO 'maks'@'localhost';
Thank you all, I hope my article was of some help to you.