How to Grant Drop/Create Table Permission to a User in MariaDB

How to Grant Drop/Create Table Permission to a User in MariaDB

Below Syntax can be used to provide Drop and Create permission on table/s in MariaDB.

Syntax:

On Single Table
MariaDB > GRANT Drop, Create ON tableName to 'UserName'@'Host' 
On all the tables in a database
 MariaDB > GRANT Drop, Create ON DatabaseName.* to 'UserName'@'Host' 

Example :
Let's say that if you like to provide Drop and Create permission to user "Aamir" in database Techbrothers. we can use below statement
MariaDB > GRANT Drop, Create ON Techbrothers.* to 'Aamir'@'localhost' 


2 comments: