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 For while now most of companies are going forward with enabling...
How to create a bootabl... omg In this article we will take a look on how to create a bootable...
lHow to install TablePl... omg In this article we will take alook on new Database IDE called T...
How to enable dark mode... omg In this article we will take a look on how to enable dark mode ...
How to Clear Viewing Ac... omg In this article we will take a look on how to clear your viewin...
Now to install Atom tex... omg In this tutorial we will take alook on how to install Atom Text...