Preparatory workNoteMysqldump.exe is the MySQL database Server Export Data tool (login corresponds to Mysql.exe)
1. Data backup
- Save data from the database server in a local SQL file
- Grammar
Mysqldump.exe –h hostname [–p port number]–u user name –p password [-d] dbname [tablename] > C:/file.sql
Note: The terminal must be running Win7 (com+r input cmd) in Administrator mode win10 (com+x select command Prompt)
Taking Win10 as an example
A. Operation results
The exported SQL file
Explaining what a data structure is and what it is,
Data structure: Only the properties of each field in the exported database file no additional information to ensure the security of the data (personal understanding)
Export database file contains structure and data
Syntax: Just remove D, the exported database file has structure and data
mysql.exe–h hostname [–p port number]–u user name –p password dbname < c:/file.sql
Results
Grammar:
mysql.exe–h hostname [–p port number]–u user name –p password dbname < C:/file.sql
MySQL-based data management