DBA Hub

📋Steps in this guide1/1

How to convert a user to superuser

Make sure you are connected with root/admin user:

mysql configurationintermediate
by MYSQL
13 views
1

How to convert a user to superuser

Make sure you are connected with root/admin user: Create normal user if not created. Grant privileges for making it super user: Reload all the privileges View the grants:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
mysql>
select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
mysql>
CREATE user 'super'@'%' IDENTIFIED BY 'super';
Query OK, 0 rows affected (0.02 sec)
mysql>
CREATE user 'super'@'localhost' IDENTIFIED BY 'super';
Query OK, 0 rows affected (0.02 sec)
mysql>
GRANT ALL PRIVILEGES ON *.* TO 'super'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.03 sec)
mysql>
GRANT ALL PRIVILEGES ON *.* TO 'super'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.03 sec)
mysql>
FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)
mysql>
show grants for super;

Comments (0)

Please to add comments

No comments yet. Be the first to comment!