Under the privileges that can be assigned to a user, I can't find whether to allow or disallow a user from being able to dump a database.
I want to disallow a user from taking backup of a database.
If a user has read access to the database he will be able to dump the database one way or the other - if he can read it, he can choose to save it somewhere as well.
According the MySQL Documentation on mysqldump:
mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, and LOCK TABLES if the --single-transaction option is not used. Certain options might require other privileges as noted in the option descriptions.
You could remove SELECT
, LOCK TABLES
and SHOW VIEW
privileges, but that's about it. Of course, taking away SELECT
kind of defeats the purpose of wanting to connect to a database.
You may want to consider tweeking the OS privileges of users in terms of where they can/cannot write their data.