This article is a mirror article of machine translation, please click here to jump to the original article.

View: 25084|Reply: 5

[Source] mysqldump imports and exports database summaries

[Copy link]
Posted on 12/14/2017 9:29:50 AM | | | |

Summary of basic usage:
1 Export all libraries
System command line
mysqldump -uusername -ppassword --all-databases > all.sql

2 Import all libraries
mysql command line
mysql>source all.sql;

3 Export some libraries
System command line
mysqldump -uusername -ppassword --databases db1 db2 > db1db2.sql

4 Import some libraries
mysql command line
mysql>source db1db2.sql;

5 Import a library
System command line
mysql -uusername -ppassword db1 < db1.sql;
Or the mysql command line
mysql>source db1.sql;

6 Export certain data sheets
System command line
mysqldump -uusername -ppassword db1 table1 table2 > tb1tb2.sql

7 Importing certain data tables
System command line
mysql -uusername -ppassword db1 < tb1tb2.sql
Or the mysql command line
mysql>
user db1;
source tb1tb2.sql;

8 mysqldump character set settings
mysqldump -uusername -ppassword --default-character-set=gb2312 db1 table1 > tb1.sql




Previous:npm tutorial (5): How to use package.json tutorial
Next:In JS, the EVAL method is used to obtain the variable value or object attribute of the dynamically generated name
 Landlord| Posted on 12/14/2017 11:26:41 AM |
 Landlord| Posted on 3/26/2018 2:10:13 PM |


For Linux, mysql imports the database sql file
 Landlord| Posted on 4/26/2019 4:10:34 PM |
MySQL uses mysqldump to export data with conditions
https://www.itsvse.com/thread-7498-1-1.html
(Source: Architect_Programmer)
 Landlord| Posted on 2/7/2021 10:01:33 AM |
MySQL exports the query results to a file
https://www.itsvse.com/thread-9557-1-1.html
 Landlord| Posted on 9/9/2025 7:59:03 PM |
Import .sql scripts to the MySQL server via the MySQL Shell tool

MySQL Shell Download:The hyperlink login is visible.

The command is as follows:

Reference:The hyperlink login is visible.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com