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
The basic structure of HTML hypertext documents is...
The connection method in MySQL table is actually ...
1. Introduction Recently, I helped a friend to ma...
Table of contents Methods that do not change the ...
Table of contents 1. Query Optimization 1. MySQL ...
Table of contents 1. Differences and characterist...
When we need to change the table name or modify t...
Preface Readers who are familiar with MySQL may f...
Preface After deploying the server, I visited my ...
Preface "High Performance MySQL" mentio...
Table of contents The first method: When the MySQ...
Table of contents What is JSONP JSONP Principle J...
This article example shares the specific code of ...
1. Problem Sometimes when we log in to Mysql and ...
RocketMQ is a distributed, queue-based messaging ...