问题描述:

Currently I have a backup up SQL file of a MySQL database where the database is already dead. I want to rebuild the MySQL database again but when I import the SQL file, it says Got a packet bigger than 'max_allowed_packet' bytes, which I found the error is caused by the fact that the insert statement is too long.

I don't have the permission to increase the max_allowed_packet of the database. The whole file is around 5 GB and it is too painful to split the insert statements by hand. Is there any tool I can automatically split long statement into 2?

网友答案:

You can open that large file using Large Text File Reader , split the file then manually adjust the last part of first file and first part of the 2nd file.

相关阅读:
Top