I have been given a VERY large mysql backup file. It is ~630 MB… I guess someone thought it was a good idea to store images in a database… Anyway, I need to restore the data somehow in MySQL. But i can’t get it done because of the filesize.
At first i tried to do it with MySQL Workbench. But when i try to import the file it gives me the following error:
Could not allocate xxxxx bytes to read file C:\backup.sql
Then i tried to do it through command prompt. I entered the following in cmd:
C:\> mysql -u user -pPassword database < C:\backups.sql
That eventually gives me the following warning:
ERROR 2006 (HY000) at line 68230: MySQL server has gone away
Guess that is also because of the big filesize?
I have no other ideas on how to restore the data. Is that still possible somehow?
Increasing the
wait_timeoutand/orinteractive_timeoutshould help. First check the current value:If this is very low (e.g. 30 seconds) then increase it (e.g. 5 minutes):
Then execute your SQL file: