For most backup operations, the mysqlbackup
command connects to the MySQL server through
This user requires certain privileges. You can either create a
new user with a minimal set of privileges, or use an
administrative account such as the root user.
The minimum privileges for the MySQL user that mysqlbackup connects are:
RELOAD on all databases and tables.
mysql.backup_history, and also
SUPER, used to optimize locking and
minimize disruption to database processing. This privilege
is only needed to back up MySQL 5.5 and higher servers.
CREATE TEMPORARY TABLES for the
mysql database. This privilege is only
needed to back up MySQL 5.5 and higher servers.
REPLICATION CLIENT, to retrieve the
binlog position, which is
stored with the backup.
To set these privileges for a MySQL user
mysqlbackup in this example) connecting from
localhost, issue statements like the following from the
mysql client program:
GRANT RELOAD ON *.* TO 'mysqlbackup'@'localhost'; GRANT CREATE, INSERT, DROP, UPDATE ON mysql.backup_progress TO 'mysqlbackup'@'localhost'; GRANT CREATE, INSERT, SELECT, DROP, UPDATE ON mysql.backup_history TO 'mysqlbackup'@'localhost'; GRANT REPLICATION CLIENT ON *.* TO 'mysqlbackup'@'localhost'; GRANT SUPER ON *.* TO 'mysqlbackup'@'localhost'; FLUSH PRIVILEGES;