Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Run Large SQL File in PHPMyAdmin

I have a huge (~500mb) SQL file that I need to run on my database. It is a data dump from a production database that I need to put into my development database. Normally, if it were smaller, I'd paste it into the SQL tab and run it, but that would definitely blow up my browser.

If I import that SQL file into the development database, is is just like running the SQL file? Or is the import function specifically set to import a whole database?

like image 289
nucleogenesis Avatar asked Jan 11 '23 06:01

nucleogenesis


2 Answers

You should try to import it from the console, so you do not depend on the file upload limitations:

C:>  mysql -u root -p < file.sql
like image 133
cornelb Avatar answered Jan 19 '23 14:01

cornelb


I can suggest two options that you can try:

1.I would say try BigDump. I had the exact same problem before. You can read and follow this article for more information:

http://moeamine.com/how-to-upload-a-big-sql-file-to-mysql

You can download big dump from the link below:

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

2.you can gzip or bzip the file and phpMyAdmin will decompress and run the script. Another option is to split the MYSQL file into number of files and load each of them individually.

like image 25
user3241732 Avatar answered Jan 19 '23 12:01

user3241732