How to provide Update, Delete and Insert Permissions to User on Table or Tables in MySQL Database
Below Syntax can be used to provide UPDATE, Delete and Insert permission on table/s in MySQL .
Syntax:
If you would like to provide update, delete and insert permission on single table in MySQL database, you can use below statement
MySQL > GRANT select, update, insert, delete ON tableName to 'UserName'@'Host'
MySQL > GRANT select, update, insert, delete ON DatabaseName.* to 'UserName'@'Host'
Example :
Let's say that if we have table "test" in Techbrothers Database and we would like to provide Update permission to user "Aamir" in MySQL. we can use below statement
MySQL > GRANT select, update, insert, delete ON Techbrothers.test to 'Aamir'@'localhost'
If we would like to provide UPDATE,DELETE and INSERT permissions on all the tables in Techbrothers Database to user account Aamir in MySQL, we can use below statement
MySQL > GRANT select, update, insert, delete ON Techbrothers.* to 'Aamir'@'localhost'
How to grant select, update, insert and delete permission to user in MySQL Server
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.