How to: Create new MySQL user and grant it a root privileges

Zaid Jaber by Zaid Jaber
How to: Create new MySQL user and grant it a root privileges

In this tutorial we will learn how to Create new MySQL user and give it the full root user privileges.

 

Step 1: Log-in to uer MySQL from the terminal 

 

~$ mysql -u root -p

 

Step 2: Write The following COmmands

This command will create the user with no privileges

mysql> CREATE USER  ''user'@'localhost'  

This command will add the root user privileges to the created user

mysql> GRANT ALL ON *.* TO 'user'@'localhost' WITH GRANT OPTION  

Now we will reset the privileges table

mysql> FULSH PRIVILEGES

 

That's it now you can log-out from root user and log-in with the new user.

Have a nice day

Category: How To

Comments (0)

Read More

How to enable Dark Mode... omg In this article we will be taking a look on how to enable dar...
How to enable Audio des... omg In this article we will take alook on how to eale audio descri...
How to disable GPS loca... omg In this article we will take alook on how to disable the GPS lo...
How to install Signal P... omg In this article we will take alook on how to install signal pri...
How to delete Imo Accou... omg In this article we will take alook on how to delete yout Imo Ac...
How to share your locat... omg In this tutorial we will take a look on how to share your locat...