MySQL Tutorial database tutorial Backup Import Export data import data export
Import and export of databases and datasheets we use mysqldump to manipulate,
Import and export of data we use the load data infile with the load data outfile operation
Exporting database methods
Parameters: Mysqldump-u user name-p password Database > save file Address
Mysqldump-uroot-proot company >d:first.sql
To export a datasheet method
Mysqldump-uroot-proot company >d:ft.sql Useramdin
Export data
Description:-u user name-p password Company database name >d:first.sql Import data Save as File table name
Another way to export a datasheet
Usage: mysqldump-u user name-P database name Table name > exported file name
Import data:
Mysql> source D:/firest.sql//data just exported
Single-Table Import
Mysql> Source D:/fit.sql
Data Import Export
Import data infile "File table data" table name with load
Example we have in the D:test.txt file content for note: To separate space with TAB key or NULL to indicate n
2 admin2 e10adc3949ba59abbe56e057f20f883e 0 2009-12-19 11:44:59 1
mysql> load Data infile "d:test.txt" table useradmin;
The data is then inserted into the Useradmin table.
Data export
Mysql>use Company;
Mysql>select * from useradmin into outfile "D:outfile.txt";
When you look at D: There will be a outfile.txt file.
Original reprint of this site annotated: www.111cn.net. NET Tutorial ">www.111cn.net