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

**URL:** <https://forums.percona.com/t/what-is-the-best-way-to-prevent-a-user-from-deleting-records-in-a-particular-table/1912>\
**Category:** Other MySQL® Questions\
**Created:** [October 8, 2012, 2:50pm UTC](https://forums.percona.com/t/what-is-the-best-way-to-prevent-a-user-from-deleting-records-in-a-particular-table/1912 "2012-10-08T14:50:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iberkner](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iberkner](https://forums.percona.com/u/iberkner)\
**Post date:** [October 8, 2012, 2:50pm UTC](https://forums.percona.com/t/what-is-the-best-way-to-prevent-a-user-from-deleting-records-in-a-particular-table/1912/1 "2012-10-08T14:50:48Z")

</div>

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?

Thanks

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [October 9, 2012, 3:34pm UTC](https://forums.percona.com/t/what-is-the-best-way-to-prevent-a-user-from-deleting-records-in-a-particular-table/1912/2 "2012-10-09T15:34:20Z")

</div>

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.
