MySQL file Import method summary

Source: Internet
Author: User
Tags time limit mysql import phpmyadmin

33 Ways to import data

First, PhpMyAdmin

Limit size: 2M

1. Create a database

2. Import. sql or. sql.zip files

Big Data import method one: http://jingyan.baidu.com/article/9113f81bcdf3a32b3214c7e7.html
Big Data import method two: http://jingyan.baidu.com/article/60ccbceb21966d64cab1979e.html

Reference Document Http://www.sjyhome.com/php/phpmyadmin-limit.html

Open php config file php.ini

Find Upload_max_filesize and Post_max_size change their values a little bigger

If the uploaded file is large, the following modifications are required

    • Max_execution_time (PHP page execution maximum time)
    • Max_input_time (Maximum time the PHP page accepts data)
    • Memory_limit (maximum memory occupied by PHP pages)

This is because phpMyAdmin upload large files, php page execution time, memory consumption is bound to become longer and larger, it needs PHP running environment, the light modified upload file size limit is not enough.

Open the config.inc.php file in the phpMyAdmin directory

Find the $cfg [' exectimelimit '] configuration option, the default value is 300, need to be modified to 0, that is, there is no time limit.

Open the import.php file in the phpMyAdmin directory to modify the value of the $memory _limit

Description: Preferred to read the memory configuration option in the php.ini configuration file Memory_limit, if empty the default memory size limit is 2M, if there is no limit to the memory size limit of 10M, you can combine the information in your php.ini configuration file to modify the code.

Second, Phpstudy

MySQL import and export using MySQL Manager

Actual command:

E:\server\phpstudy>mysql\bin\mysql.exe-uroot-proot DBNAME --default-character-set=utf8 0< D:\db.sql

You can also change your own MySQL command

Third, source Import

Locate the My.ini file in the MySQL installation directory by adding the following code:
Interactive_timeout = 120
Wait_timeout = 120
Max_allowed_packet = 32M

======================================
The command line to import SQL is as follows:
SOURCE "path name" +/mytest_emp_dept.sql

File path in Windows to use/replace the default path character \
======================================

Cases:

Mysql>use dbtest;
Mysql>set names UTF8;
Mysql>source D:/www/sql/back.sql;

MySQL file Import method summary

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.