Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. 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

I have a 40 GB MySQL dump file. Can anyone give me the idea how to import the file via phpmyadmin?

share|improve this question
Don't. There's clearly a difference of opinion about the scale of your operations between whoever only allows you access via PHPmyAdmin and your business requirements (requiring 40GB of data). – 0xCAFEBABE Jul 29 '13 at 7:29
I'd say don't even try. Load it from the database server, not over a web interface. – Mat Jul 29 '13 at 7:30

If you really want to restore it with PHPmyadmin you have to split the files into little chunks, because PHP will block too large files, depending on the serverconfig.

  1. Dump just the structure of your tables
  2. Import them
  3. Dump the data of your tables into a csv
  4. split the csv (on windows you can do this with gsplit for example and on unix with the split command
  5. Import the little chunks of data

But in general i'll recommend the commandline or contact your ISP

share|improve this answer

You better use a program like Sequel Pro or MySQL Workbench to import data if you don't have terminal access.

If you have terminal access use:

mysql -u username -ppassword database_name < dump.sql
share|improve this answer

Don't do large restore with phpmyadmin, PHP will block you, you will have something like "Allowed memory size" after few megs loaded...


share|improve this answer
It depends - if I run my server, I can change the PHP settings as I wish, and even very big files could be uploaded that way. I don't say phpmyadmin will digest it, so I basically agree with 'don't do it' – dezso Jul 30 '13 at 8:10
Sure, but if you have access on your servers, use the mysql client instead. – Maxime FOUILLEUL Jul 31 '13 at 8:15

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.