Reputation: 5030
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?
Upvotes: 0
Views: 307
Reputation: 41
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.
Upvotes: 0