How to Grant Insert Permission on Table/s to a User in MariaDB
Below Syntax can be used to provide INSERT permission on table/s in MariaDB.Syntax:
On Single Table
MariaDB > GRANT INSERT ON tableName to 'UserName'@'Host'
On all the tables in a database
MariaDB > GRANT INSERT ON DatabaseName.* to 'UserName'@'Host'
Example :
Let's say that if we have table "test" in Techbrothers Database and we would like to provide INSERT permission to user "Aamir" in MariaDB. we can use below statement
MariaDB > GRANT INSERT ON Techbrothers.test to 'Aamir'@'localhost'
If we would like to provide INSERT permission on all the tables in Techbrothers Database to user account Aamir in MariaDB, we can use below statement
MariaDB > GRANT INSERT ON Techbrothers.* to 'Aamir'@'localhost'
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.