安装xtrabackup 参考:linux centos 安装xtrabackup 一键安装shell脚本
mysql -u root -paaaaaa -e "CREATE USER 'bkpuser' @ 'localhost' IDENTIFIED BY 's3cr%T' ; GRANT BACKUP_ADMIN , PROCESS , RELOAD , LOCK TABLES , REPLICATION CLIENT ON * . * TO 'bkpuser' @ 'localhost' ; GRANT SELECT ON performance_schema 。log_status TO 'bkpuser' @ 'localhost' ;GRANT SELECT ON performance_schema 。keyring_component_status TO bkpuser @ 'localhost' ; FLUSH PRIVILEGES ;"
xtrabackup: recognized server arguments: --datadir=/var/lib/mysql
xtrabackup: recognized client arguments: --user=root --password=* --backup=1 --target-dir=/data/mysqlback
xtrabackup version 8.0.4 based on MySQL server 8.0.13 Linux (x86_64) (revision id: c2c0777)
210806 22:21:59 version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root' (using password: YES).
perl: relocation error: /usr/lib64/perl5/vendor_perl/auto/DBD/mysql/mysql.so: symbol mysql_init, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference
210806 22:21:59 Connecting to MySQL server host: localhost, user: root, password: set, port: not set, socket: not set
Using server version 8.0.26
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: open files limit requested 0, set to 1048576
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = .
xtrabackup: innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 50331648
Number of pools: 1
Unknown redo log format (4). Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/ upgrading-downgrading.html.
Page Not Found
We're sorry, the page or file you requested was not found on this server.
You may wish to:
View our Documentation Library
View our Documentation Archive
Search our Current Documentation:
View our Site Map
Search our site
Report a broken link or missing page
Permissions and Privileges Needed¶
Once connected to the server, in order to perform a backup you will need READ and EXECUTE permissions at a filesystem level in the server’s datadir.
The database user needs the following privileges on the tables or databases to be backed up:
RELOAD and LOCK TABLES (unless the --no-lock option is specified) in order to run FLUSH TABLES WITH READ LOCK and FLUSH ENGINE LOGS prior to start copying the files, and requires this privilege when Backup Locks are used
BACKUP_ADMIN privilege is needed to query the performance_schema.log_status table, and run LOCK INSTANCE FOR BACKUP, LOCK BINLOG FOR BACKUP, or LOCK TABLES FOR BACKUP.
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 Handling FLUSH TABLES WITH READ LOCK),
SUPER in order to start/stop the replication threads in a replication environment, use XtraDB Changed Page Tracking for Incremental Backups and for handling FLUSH TABLES WITH READ LOCK,
CREATE privilege in order to create the PERCONA_SCHEMA.xtrabackup_history database and table,
ALTER privilege in order to upgrade 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 --incremental-history-name or --incremental-history-uuid in order for the feature to look up the innodb_to_lsn values in the PERCONA_SCHEMA.xtrabackup_history table.
SELECT privilege on the keyring_component_status table to view the attributes and status of the installed keyring component when in use.
The explanation of when these are used can be found in How Percona XtraBackup Works.
An SQL example of creating a database user with the minimum privileges required to full backups would be:
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:10.8.103.62,2025-12-10 12:07:34,Processed in 0.01852 second(s).