MySQL database import and Export

Source: Internet
Author: User
Tags import database

One, SQL file Import Database

1.mysql-u User name-p password

2.use database name; If not, build one first.

3.source d:\ file name. sql; The file path.

4.repair table name, table name, ...; The table can be repaired to prevent errors in the table.

5.check table name, table name, ...; Check all tables, is not OK.

Second, the TXT file into the table

1.mysql-u user name-p password  

2.use database name;

3.create table if not EXISTS name (field ...); Create a table first

4.load Data local infile "d:\ filename. txt" into table name; File path

5.repair table name;

6. Check table name;

Third, database export/backup

1.mysqldump-u User name-p password database name > d:\ filename. sql//sql file path


This article is from the "high-anti-server sales, bring operation and maintenance" blog, please be sure to keep this source http://kenvik.blog.51cto.com/11000054/1858441

MySQL database import and Export

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.