MySQL Import data command

Source: Internet
Author: User
Tags mysql import

Transferred from: http://blog.sina.com.cn/s/blog_610997850100mwv8.html

Today encountered a problem to use phpMyAdmin import 1G data, but in how all can not import, with the command line is easy to fix. Use the MySQL source command to import larger files.
The first type:
Mysql>use dbtest;
Mysql>set names UTF8;
Mysql>source D:/www/sql/back.sql;


To import multiple files through the source command, you can create a new Sou.sql file that contains the following command
For example:
SOURCE D:/a1.sql;
SOURCE D:/a2.sql;
When you run


This allows you to import multiple SQL files within a single source command.

The second type:

Later, when the import of the specified character set--default-character-set=utf8, import the backup file again, all smooth.

The command is as follows:
Mysql-uroot-p--default-character-set=utf8 Test_server < Test_service.sql

MySQL Import data command

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.