How to provide full permissions on a database to user in MySQL Server - MySQL DBA Tutorial

How to provide full permissions to user in MySQL Database

To provide full permissions on a Database to user in MySQL Server, you will be using below syntax.

MySQL > GRANT ALL ON DatabaseName.* TO 'UserName'@'Host' WITH GRANT OPTION;

WITH GRANT OPTION, user will be able to provide permissions to other users on the database. If you don't want that then remove the "With GRANT OPTION" from above statement.

Let's create user TB and provide full permissions on Database name "TechBrothers" , We also want the TB user to have permissions to GRANT permissions on "TechBrothers" databases to other users.
MySQL > Create User 'TB'@'localhost' Identified by "Password123";

Grant full permissions on TechBrothers Databases to user account TB.

MySQL > GRANT ALL ON TechBrothers.* TO 'TB'@'localhost' With GRANT OPTION; 


  1. It seems that the internet is very much interested in creating a fiction-based story like a Slender Man and other repeated ghost stories. Among all those false stories Teresa fidalgo ghost is one of them that gets hyped on the internet in a different way. I recommend this article for detailed information.