MariaDB rename account

  • Last update: Apr 3, 2024
  • Views: 37
  • Author: Admin
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:

  1. A list of users.
  2. Rename account.

 

1. A list of users.

All users are stored in the mysql.user table.

mariadb> SELECT USER, HOST FROM mysql.user;

mariadb_rename_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';

mariadb_rename_user


 

Thank you all, I hope my article was of some help to you.

SIMILAR ARTICLES