Today I tried to import a 150M data file (. sql) with Heidisql, resulting in an out of memory error. Search on the Internet a lot of cases, have failed to solve the problem. I even suspect that MySQL's default memory settings are too small. Then ran to the My.ini file to modify the size of the innodb_buffer_pool_size to 96M * 6. To heidisql inside again to import, error message will not come out immediately, but after about a minute or appear out of memory error.
Later a friend said, bulk import data do not use the MySQL client, will explode. So, with the Cmd bar, online search for the next solution:
How to import a SQL file using the command line in MySQL?
A common use of mysqldump are for making a backup of a entire database:shell> mysqldump db_name > Backup-file.sqlyou Can load the dump file back into the server like this:unixshell> MySQL db_name < backup-file.sqlsame in Windows com and promptmysql-p-u[user] [database] < backup-file.sqlpowershellc:\> cmd.exe/c "Mysql-u root-p db_name < BAC Kup-file.sql "MySQL command linemysql> use db_name;mysql> source backup-file.sql;
I used the last method, CD to the folder to hold the SQL file, and then mysql-uroot-proot into MySQL,
then use DatabaseName;
SOURCE **.sql;
The data in the SQL file is automatically imported into the specified DatabaseName database.