Use the --all-database parameter when performing a full backup of MySQL for example: #mysqldump -u root -h localhost -p --all-database > /root/all.sql When importing data, you can first log in to the MySQL database and use source /root/all.sql to import. question: I want to filter out certain libraries when backing up the database with mysqldump. In this case, you cannot use --all-database when backing up mysqldump, but use --database instead . As follows: When backing up the database , filter out the information_schema, mysql, test, and jkhw_db libraries [root@fangfull-backup ~]# mysql -uroot -p -e "show databases" +--------------------+ How to do it: [root@fangfull-backup ~]# mysql -uroot -p -e "show databases"|grep -Ev "Database|information_schema|mysql|test|jkhw_db" The above method of filtering out certain libraries during a complete MySQL backup is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: JavaScript Dom implements the principle and example of carousel
>>: Detailed explanation of configuring keepalived log to another path in centos7
This article tests the environment: CentOS 7 64-b...
This article uses examples to illustrate the prin...
Table of contents Preface: 1. Introduction to rol...
Preface Recently, when working on a high-availabi...
Table of contents Compare the empty string '&...
1. Compile and install ovs from source code: Inst...
Compatible with new CSS3 properties In CSS3, we c...
MySQL bidirectional backup is also called master-...
Table of contents Problem Description Principle A...
Ubuntu does not allow root login by default, so t...
Table of contents 1. The direction of this in the...
Panther started as a rookie, and I am still a roo...
Background color and transparency settings As sho...
First way: skip-grant-tables: Very useful mysql s...
This article shares the specific implementation c...