Export a single table
Importing a single table
Export the entire table
Supplementary knowledge: MySQL import and export sql files: export the entire database, export a table, export a database structure, import a database mysql import and export sql file Under the window 1. Export the entire database
2. Export a table
3. Export a database structure
4. Import the database Common source commands Enter the mysql database console, such as
Then use the source command, followed by the script file (such as the .sql file used here)
Import data into the database mysql -uroot -D database name Import data into a table in the database mysql -uroot -D database name table name
Under Linux 1. Export the database using the mysqldump command (note the installation path of mysql, which is the path of this command): 1. Export data and table structure:
After pressing Enter, you will be prompted to enter a password 2. Export only the table structure
Note: /usr/local/mysql/bin/ —> mysql data directory 2. Import database 1. First create an empty database
2. Import database Method 1: (1) Select a database
(2) Set the database encoding
(3) Import data (pay attention to the path of the sql file)
Method 2:
The above operation of exporting the entire and single table data of MySQL is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: JavaScript to implement a simple shopping form
>>: How to deploy a simple c/c++ program using docker
As shown in the following figure: If the version ...
This article introduces an example of using HTML+...
1. Install the cross-system file transfer tool un...
Table of contents Unary Operators Boolean Operato...
DIV background is semi-transparent, but the words ...
Table of contents 1. Principle Overview Query Cac...
1. Connect to MYSQL Format: mysql -h host address...
Before talking about the structural markup of web...
Three types of message boxes can be created in Ja...
Table of contents 1. Theory SERIALIZABLE REPEATAB...
1. Grammar: <meta name="name" content...
This article shares with you a detailed tutorial ...
Copy code The code is as follows: <!-- List ta...
Table of contents 1. The concept of closure Addit...
The color matching in website construction is ver...