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
Table of contents Preface 1. Local port forwardin...
Table of contents DOM processing Arrays method Su...
Table of contents 0. The kernel tree that comes w...
The fastest way to experience the latest version ...
Chinese Tutorial https://www.ncnynl.com/category/...
When using Dreamweaver or FrontPage to create HTM...
Table of contents 1- Error details 2-Single Solut...
Table of contents nonsense Functions implemented ...
Using CI to build docker images for release has g...
Recently, due to the need to test security produc...
query_cache_limit query_cache_limit specifies the...
Recently, when I was using Docker to deploy a Jav...
Operating system: Ubuntu 17.04 64-bit MySQL versi...
A mysql-like php switch case statement. select xx...
Table of contents 1. Project Construction 2. Vue3...