MySQL Restore Large Dump

For this answer, let's use /root/MySQLData.sql as the SQL File.

Go into mysql via the client and run it like this:

mysql> source /root/MySQLData.sql

Give it a Try !!!

UPDATE 2011-12-16 21:08 EDT

I just caught on to your problem: Your program is not running because you did not supply the password. It is stuck in the background waiting for a password. That's your actual problem. Kill the job and run it again with the password on the command line:

mysql -u root -ppassword DB_NAME < .SQL FILE

or just use my original submitted answer up above.

UPDATE 2011-12-19 11:40 EDT

I just re-read the question. You said single table. Then it hit me !!!

You need to ramp up your bulk_insert_buffer_size. The default is 8M.

To see what your current setting is, run this:

mysql> show variables like 'bulk%';

Just add this to /etc/my.cnf

[mysqld]
bulk_insert_buffer_size=512M

So as to not restart mysql, run this SQL command:

SET GLOBAL bulk_insert_buffer_size = 1024 * 1024 * 512;

Give it a Try !!!

Tags:

Mysql

Restore