import/export. sql files using the mysqldump command under Windows

Source: Internet
Author: User
1.mysqldump.exe in the bin directory of the MySQL installation directory

2. Use the Windwos command to enter the bin directory of the MySQL installation directory.

3. Use the mysqldump command to export the. sql file (1) to export the data for the entire database mysqldump-u username-P database name > storage location + exported file name (2) Export data for a table mysqldump-u user name-P database Name table name > Storage location + exported file name (3) Export the structure of a table mysqldump-d-u user name-P database Name table name > storage location + exported file name (4) The structure of the exported database mysqldump-u user name Wcnc-p-d--add-dro P-table smgp_apps_wcnc> Storage location + exported file name-D No data--add-drop-table add a drop table (5) to the data from the remote export database before each CREATE statement mysqldump-h Ip-u Username-P Database name > location + exported file name 4. Exporting data from an entire database
The exported data file is under the E-disk with the name Data.sql
(5) Export data from a table

The exported data file is under the E disk, with the name Data2.sql import data.sql file (1) into the MySQL installation directory of the bin directory (2) login (Mysql-u root-p) (3) authentication password (******) (4) reference to the target database to be imported (use temp_test_db) database temp_test_db database must exist. (5) The Import command source data file directory (source E:\data.sql) takes a certain amount of time, and the import file size is related.



To view the tables in the database temp_test_db

Above

import/export. sql files using the mysqldump command under Windows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.