How to export the database table structure and data from mysql

Source: Internet
Author: User
The specific usage of the command line is as follows: mysqldump-u with anonymous name-p password-d database table name Script Name; export the entire database structure and data mysqldump-hlocalhost-uroot-p123456databasedump. SQL export a single data table structure and data mysqldump-hlocalhost-uroot-p123456databasetabledump

The specific usage of the command line is as follows: mysqldump-u uses the slave name-p password-d database name table name Script Name; export the entire database structure and data mysqldump-h localhost-uroot-p123456 database dump. SQL export the structure and data of a single data table mysqldump-h localhost-uroot-p123456 database table dump

The command line is used as follows:

Mysqldump-u use the primary name-p password-d database name Table Name> Script Name;

Export the entire database structure and data
Mysqldump-h localhost-uroot-p123456 database> dump. SQL

Export the structure and data of a single data table
Mysqldump-h localhost-uroot-p123456 database table> dump. SQL

Export the entire database structure (excluding data)
Mysqldump-h localhost-uroot-p123456-d database> dump. SQL

Export a single data table structure (excluding data)
Mysqldump-h localhost-uroot-p123456-d database table> dump. SQL

Related Article

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.