The advantages of this solution are simplicity and ease of use; the disadvantage is longer downtime. Therefore, it is suitable for situations where the amount of data is not large, or a longer downtime is allowed, and it can be completed within this time frame. Following are some uses of MySQLdump command: 1. Export the entire database data and table files into a sql file mysqldump -uroot -proot database1 > database1.sql 2. Import the data of the sql file into mysql instead of mysqldump mysql -uroot -proot database2 < database1.sql 3. Export the data and structure of a table in the database to a sql file mysqldump -uroot -proot database1 tablename > table1.sql 4. Import the data of the sql file into mysql instead of mysqldump mysql -uroot -proot database1 < database1.sql 5. The mysql data migration command backs up the data in the database table whose id is greater than 22. The SQL is as follows mysqldump -u test -ptest database table --default-character-set=gbk -t --where="id>22" >c:\test.sql 6. Back up the information of students older than 30 mysql> select * from students where Age > 30 into outfile '/tmp/stud.txt'; mysql> load data infile '/tmp/stud.txt' into table students; Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links You may also be interested in:
|
<<: Mini Program to Implement Sieve Lottery
>>: How to install binary MySQL on Linux and crack MySQL password
To be honest, this question involves a lot of cor...
Kubernetes supports three types of authentication...
URL rewriting helps determine the preferred domai...
There are many types of auto-increment IDs used i...
Use event delegation to implement message board f...
This article introduces Docker+Jenkins automatic ...
This article shares the installation and configur...
How to install and configure MySQL on Mac OS 10.1...
Table of contents Preface Global Lock Table lock ...
The benefits of using MySQL master-slave replicat...
Table of contents 1. System environment 2. Operat...
Table of contents el-scrollbar scroll bar el-uplo...
Preface: The most commonly used MySQL logical bac...
Table of contents 1. Introduction to v-slot 2. An...
In this post, we’ll use the :placeholder-shown ps...