DBA Hub

📋Steps in this guide1/1

Alter an user in mysql

Rename a user:

mysql configurationintermediate
by MYSQL
13 views
1

Alter an user in mysql

Rename a user: change password of a user: Change resource option: Lock/unlock an account:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mysql>
RENAME USER 'dbatest' TO 'dbaprod';
Query OK, 0 rows affected (0.02 sec)
mysql>
ALTER USER 'dbaprod'@'%' IDENTIFIED BY 'dbaprod';
Query OK, 0 rows affected (0.01 sec)
mysql>
alter user 'dbaprod'@'%' with MAX_USER_CONNECTIONS 10;
Query OK, 0 rows affected (0.01 sec)
mysql>
alter user 'dbaprod'@'%' account lock;
Query OK, 0 rows affected (0.01 sec)
mysql>
alter user 'dbaprod'@'%' account unlock;
Query OK, 0 rows affected (0.01 sec)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!