Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While restoring a dump file having 4 GB of size Mysql gives Out of memory around after 10 minutes success full restore. Error details are given below.

Configuration: Mysql version : Mysql 5.0.41 32 bit max_allowed_packet = 300M

mysql>source my_dump.sql


Query OK, 2310 rows affected (0.69 sec)
Records: 2310  Duplicates: 0  Warnings: 0

mysql: Out of memory (Needed 1564047040 bytes)
mysql: Out of memory (Needed 1564047048 bytes)

Solutions will be appreciable.

share|improve this question
up vote 2 down vote accepted

This sounds alot like your RAM ran full during the process of restoring the dump. Have you checked with free -m if your RAM and SWAP run full?

If this is the case, one solution could be to either manually split the dump (so each table has it's own file and you can restore them step by step) or you could increase the SWAP space of your machine.

share|improve this answer

You can temporary increase your swap space by creating a swap file. That won;t require reboot or disk re-partitioning.

Here's how-to

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.