Hari
Hari

Reputation: 89

How to import 10 gb sql file in mysql quickly?

I have 10 gb sql file and I am importing this file using command line :

mysql -u username -p database_name < file.sql

However, it's taking too much time. Is there any other option or tool to import this file quickly?

Upvotes: 2

Views: 1948

Answers (1)

giolliano sulit
giolliano sulit

Reputation: 1006

I'd suggest using MySQL big dump, it's worked for me in the past with databases around that size:

http://www.ozerov.de/bigdump/

Staggered import of large and very large MySQL Dumps (like phpMyAdmin dumps) even through the web servers with hard runtime limit and those in safe mode. The script imports only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.

Upvotes: 1

Related Questions