Not the answer you need?
Register and ask your own question!

What is the best way to prevent a user from deleting records in a particular table?

iberkneriberkner ContributorInactive User Role Advisor
We have a user which has full access to a particular database, but in this instance, we want to prevent that user from being able to delete records of a particular table. Inserts and updates are OK.

Is it just a matter of granting the specific permissions on the table itself and excluding the ones you don't want?



  • sterinsterin Mentor Inactive User Role Contributor
    AFAIK you can't revoke rights on a lower level that has been given on a higher.

    But if you give that user all rights _except_ delete on the DB level and then give the user the delete rights on the table level for all tables except the one you don't want him to be able to delete from.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.