In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Install and test xtrabackup8.0
Xtrabackup 2.4. Backup and recovery of MySQL 8.0 is no longer supported, the following error will be reported when using it!
Error: MySQL 8.0 and Percona Server 8.0 are not supported by Percona Xtrabackup 2.4.x series. Please use Percona Xtrabackup 8.0.x for backups and restores.
Mysql8.0
[root@enbao ~] # clear
[root@enbao ~] # cat / etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
Install percona-xtrabackup-80
[root@enbao soft] # yum-y install percona-xtrabackup-80-8.0.7-1.el7.x86_64.rpm
Installed:
Percona-xtrabackup-80.x86_64 0RO 8.0.7-1.el7
Complete!
Check the results after installation and find that there is no innobackupex command.
[root@enbao soft] # rpm-ql percona-xtrabackup-80-8.0.7-1.el7.x86_64
/ usr/bin/xbcloud
/ usr/bin/xbcloud_osenv
/ usr/bin/xbcrypt
/ usr/bin/xbstream
/ usr/bin/xtrabackup
/ usr/lib64/xtrabackup/plugin/keyring_file.so
/ usr/lib64/xtrabackup/plugin/keyring_vault.so
/ usr/share/doc/percona-xtrabackup-80-8.0.7
/ usr/share/doc/percona-xtrabackup-80-8.0.7/LICENSE
/ usr/share/man/man1/xbcrypt.1.gz
/ usr/share/man/man1/xbstream.1.gz
/ usr/share/man/man1/xtrabackup.1.gz
Back up 3306 instances and restore them back to 3306
Create test data
Root@enbao 09:56: [enbao] > create database test
Query OK, 1 row affected (0.06 sec)
Root@enbao 09:57: [enbao] > use test
Database changed
Root@enbao 09:57: [test] > create table T1 (id int (10) NOT NULL AUTO_INCREMENT,name varchar (20), primary key (id))
Query OK, 0 rows affected, 1 warning (0.09 sec)
Root@enbao 09:59: [test] > insert into T1 (name) values ('a'), ('b'), ('c')
Query OK, 3 rows affected (0.09 sec)
Records: 3 Duplicates: 0 Warnings: 0
Root@enbao 10:00: [test] > select * from T1
+-+ +
| | id | name |
+-+ +
| | 1 | a |
| | 2 | b | |
| | 3 | c |
+-+ +
3 rows in set (0.00 sec)
Create a backup directory
[root@enbao data] # mkdir-p / data/backup/
1.xtrabackup-- defaults-file=/data/mysql/my3306.cnf-S / data/mysql/mysql3306.sock-uroot-proot123-- backup-- no-timestamp-- target-dir=/data/backup/db3306_date +% Y%m%d
Original instance of shutdown, cold backup of original data
[root@enbao soft] # mysqladmin-uroot-proot123 shutdown
Mv mysql3306 mysql3306_bakmkdir mysql3306/ {data,logs,tmp}-p
Xtrabackup-defaults-file=/data/mysql/my3306.cnf-copy-back-target-dir=/data/backup/db3306_20191027/ for data recovery
Change directory permissions chown-R mysql:mysql mysql3306/usr/local/mysql/bin/mysqld-- defaults-file=/data/mysql/my3306.cnf &
Check the error log for errors and log in to the database to verify availability!
[root@enbao logs] # grep-I "error" / data/mysql/mysql3306/logs/error.log
2019-10-27T10:37:35.389830-04:00 1 [ERROR] [MY-011971] [InnoDB] Tablespace 'innodb_system' Page [page id: space=0, page number=5] log sequence number 29956511 is in the future! Current system log sequence number 29861388.
2019-10-27T10:37:35.389873-04:00 1 [ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
[root@enbao logs] # mysql-S / data/mysql/mysql3306.sock-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 9
Server version: 8.0.17 MySQL Community Server-GPL
Root@enbao 11:01: [test] > select * from T1
+-+ +
| | id | name |
+-+ +
| | 1 | a |
| | 2 | b | |
| | 3 | c |
+-+ +
3 rows in set (0.00 sec)
Root@enbao 11:01: [test] > insert into T1 (name) values ('d'), ('e')
Query OK, 2 rows affected (0.04 sec)
Records: 2 Duplicates: 0 Warnings: 0
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.