Friday, December 13, 2013

How to import MySql dump with big blob field?

Error message "Error Code: 2006 - MySQL server has gone away" is prompted when trying to import MySql database dump consists of big blob field value into MySql database.

Below are the steps to resolve this issue
1. Edit max_allowed_packet parameter in my.ini
max_allowed_packet = 524288000
2. Restart MySql database server
Assume the parameters below represent 
Database user id, for example, 'root' : [DB_USER_LOGIN] 
Database dump file : [DB_DUMP_FILE] 
Database name : [DATABASE_NAME]

3. Connect to database
mysql -u[DB_USER_LOGIN]
4. Use the new database that created for importing
5. Import the data from database dump into newly created database.

No comments: