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
Table of contents Preface Using websocket Constru...
The common way to deploy a springboot project to ...
Using Navicat directly to connect via IP will rep...
Preface This article introduces a simple BAT scri...
Table of contents Introduction Introduction Aggre...
1. Download MySQL Image Command: docker pull mysq...
Table of contents The background is: What will ha...
Table of contents Preface 1. Monadic Judgment 1.1...
1. Introduction MDL lock in MYSQL has always been...
The virtual machine is in use or cannot be connec...
Table of contents Overview Static type checking C...
Recently, I encountered many problems when instal...
Docker has been very popular in the past two year...
The first cutter in China github.com/chokcoco Fir...
front end css3,filter can not only achieve the gr...