Tuesday, April 19, 2022

How to convert a user In MySQL

How to convert a user In MySQL


Make sure you are connected with root/admin user:

mysql> select current_user();


Create normal user if not created.

mysql> CREATE user 'super'@'%' IDENTIFIED BY 'super';


mysql> CREATE user 'super'@'localhost' IDENTIFIED BY 'super';


Grant privileges for making it super user:

mysql> GRANT ALL PRIVILEGES ON *.* TO 'super'@'%' WITH GRANT OPTION;

mysql> GRANT ALL PRIVILEGES ON *.* TO 'super'@'localhost' WITH GRANT OPTION;


Reload all the privileges

mysql> flush privileges;


View the grants:

mysql> show grants for super; 

No comments:

Post a Comment