commvault xtrabackup全实例备份失败 处于未决状态(下)
接上篇 commvault服務器端報錯和xtrabackup本地備份報錯一致,所以排除commvault軟件本身問題。
查看數據庫表 show databases;
SELECT Host, User, plugin from user;出現如下報錯:
ERROR 1046 (3D000): No database selected
解決方案:先use mysql;use命令選擇數據庫
xtrabackup備份
xtrabackup --backup -uroot -p --target-dir=/usr/local/mysql/data
xtrabackup version 8.0.4 based on MySQL server 8.0.13 Linux (x86_64) (revision id: c2c0777)
220824 22:35:38 version_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/usr/local/mysql/mysql.sock’ as ‘root’ (using password: YES).
Failed to connect to MySQL server: DBI connect(‘;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/usr/local/mysql/mysql.sock’,‘root’,…) failed: Authentication plugin ‘caching_sha2_password’ cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory at - line 1535.
220824 22:35:38 Connecting to MySQL server host: localhost, user: root, password: set, port: 3306, socket: /usr/local/mysql/mysql.sock
Using server version 8.0.28
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /usr/local/mysql/data
xtrabackup: open files limit requested 0, set to 1024
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.
更改plugin試試
ALTER USER ‘root’@‘%’ IDENTIFIED WITH caching_sha2_password BY ‘123456’;
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解決方法:刷新 flush privileges;
新建了一個用戶
CREATE USER ‘shauser’@'localhost’IDENTIFIED WITH mysql_native_password BY ‘password’;
grant all privileges on . to shauser@‘localhost’ with grant option;
flush privileges;
“Xtrabackup8.0.11還不支持備份MySQL8.0.20
MySQL修改redo log格式版本的原因是在MySQL 8.0中,由于undo表空間ID值的變化,undo表空間修改的重做日志記錄的大小增加了,導致需要額外的字節存儲,redo log記錄大小的變化導致寫I/O較多的工作負載的性能下降(官方記錄是10%),為了解決這個問題,對redo log日志格式進行了修改(優化)
mysql降級到8.19后解決。”
目前mysql 是8.0.28
xtrabackup --version
xtrabackup: recognized server arguments: --datadir=/usr/local/mysql/data
xtrabackup version 8.0.4 based on MySQL server 8.0.13 Linux (x86_64) (revision id: c2c0777)
經排查 xtrabackup8.0.4不支持mysql8.0.28
https://docs.percona.com/percona-xtrabackup/8.0/index.html
接下來測試:xtrabackup8.0.11—mysql8.0.19
xtrabackup 8.0.28/29–mysql8.0.28
總結
以上是生活随笔為你收集整理的commvault xtrabackup全实例备份失败 处于未决状态(下)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PaddleDetection支持的数据
- 下一篇: Linux实战案例(2)实例讲解使用软连