xtrabackup 用户权限
1.1、建用户及授权
The database user needs the following privileges on the tables/databases to be backed up:
RELOAD and LOCK TABLES (unless the --no-lock option is specified) in order to FLUSH TABLES WITH READ LOCK and FLUSH ENGINE LOGS prior to start copying the files, and LOCK TABLES FOR BACKUP and LOCK BINLOG FOR BACKUPrequire this privilege when Backup Locks are used,
REPLICATION CLIENT in order to obtain the binary log position,
CREATE TABLESPACE in order to import tables (see Restoring Individual Tables),
PROCESS in order to run SHOW ENGINE INNODB STATUS (which is mandatory), and optionally to see all threads which are running on the server (see Improved FLUSH TABLES WITH READ LOCK handling),
SUPER in order to start/stop the slave threads in a replication environment, use XtraDB Changed Page Tracking for Incremental Backups and for Improved FLUSH TABLES WITH READ LOCK handling,
CREATE privilege in order to create the PERCONA_SCHEMA.xtrabackup_history database and table,
INSERT privilege in order to add history records to the PERCONA_SCHEMA.xtrabackup_history table,
SELECT privilege in order to use innobackupex --incremental-history-name or innobackupex --incremental-history-uuid in order for the feature to look up the innodb_to_lsn values in thePERCONA_SCHEMA.xtrabackup_history table.
https://blog.csdn.net/qq_28721869/article/details/118853884
CREATE USER 'bkpuser'@'localhost' IDENTIFIED BY 'bkpuser@1234';
GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT,super ON *.* TO 'bkpuser'@'localhost';
FLUSH PRIVILEGES;