How to Grant all permissions to user in MySQL Server - MySQL DBA Tutorial

How to Grant all permissions to user in MySQL Server 


If you would like to provide all permissions like root user to user account in MySQL Server, you can use below command.
First of all let's create a user by using below 


Syntax:

MySQL > Create User 'UserName'@'localhost';

To provide all permission including with GRANT , below syntax can be use


MySQL > GRANT ALL ON *.* To 'UserName'@'HostName'  With GRANT OPTION;

Example:
Let's say that you would like to create user Aamir and provide him all the permissions.



MySQL > Create user 'Aamir'@'localhost' Identified by 'Password'; 

 MySQL > GRANT ALL ON *.* to 'Aamir'@'localhost' With Grant Option;

Grant all privileges to user in MySQL Server by using MySQL Command line

3 comments:

  1. Nice article. All the sections of your site covered with great functions. I really like the content and discussions on your site. Thanks a lot for allowing me to join. I love to see more about GB WhatsApp. Keep sharing and updating. Also share more posts with us. Thank you.

    ReplyDelete
  2. Thanks for sharing. visit our website and read guide on how do you mine pi

    ReplyDelete