MySQL Forums
Forum List  »  MySQL Administrator

Re: How to create a backup-only user
Posted by: Scott Nemes
Date: November 08, 2012 05:21PM

The backup user has to be able to at minimum SELECT from the tables you want to backup (assuming you are using mysqldump or similar to do a SQL backup). However that is a minimum; if you want to do consistent snapshots, the backup user will need the LOCK TABLES permission as well, and if you want replication information then it will need the RELOAD and REPLICATION CLIENT permissions.

GRANT SELECT, LOCK TABLES, RELOAD, REPLICATION CLIENT ON yourdatabase.* TO 'backup'@'localhost' IDENTIFIED BY PASSWORD 'password'

Replace yourdatabase.* with *.* if you want the backup user to be able to backup any database (with the caveat that the user can then be used to read data from any database).

--
Scott Nemes
MySQL DBA

http://www.linkedin.com/in/scottnemes
http://www.twitter.com/ScottNemes



Edited 1 time(s). Last edit at 11/08/2012 05:22PM by Scott Nemes.

Options: ReplyQuote


Subject
Written By
Posted
Re: How to create a backup-only user
November 08, 2012 05:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.