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