MariaDB rename account

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

MariaDB - ERROR Incorrect definition of table
MariaDB - ERROR Incorrect definition of table
MARIADB
Read more
Mariabackup backup - gzip compression
Mariabackup backup - gzip compression
MARIADB
Read more
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
Mariabackup error - Error writing file UNKNOWN errno 32 Broken pipe
MARIADB
Read more