导入大的sql文件到mysql数据库遇到的问题
(2015-05-05 16:11:25)分类: DataBase |
ERROR 2006 (HY000): MySQL server has gone away
max_allowed_packet=64M
Adding this line into my.ini
This is useful when the columns have large values, which cause the
issues, you can find the explanation
On Windows this file is located at: "C:\ProgramData\MySQL\MySQL Server 5.6" On Linux (Ubuntu): /etc/mysql
link:http://stackoverflow.com/questions/10474922/error-2006-hy000-mysql-server-has-gone-away
ERROR:The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.
A change in the 5.6.20 release notes:
Redo log writes for large, externally stored BLOB fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log BLOB writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation.
As a result of the redo log BLOB write limit introduced for MySQL 5.6, innodb_log_file_size should be set to a value greater than 10 times the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields).Failing to do so could result in "Row size too large" errors.
(emphasis mine)
The default for innodb_log_file_size
So you need to increase innodb_log_file_size
link: