Importing file that is almost 30 MB
Moderator: General Moderators
Importing file that is almost 30 MB
Hello
I have a huge database thats about 30 MB, I used phpMyAdmin to export the database. But when I want to import it the max file is only 8MB even tho I put 30 MB in php.ini. Is 8 MB the Maximum of php upload limit? How can I import this database if I can't do it with phpMyAdmin?
Thank You
I have a huge database thats about 30 MB, I used phpMyAdmin to export the database. But when I want to import it the max file is only 8MB even tho I put 30 MB in php.ini. Is 8 MB the Maximum of php upload limit? How can I import this database if I can't do it with phpMyAdmin?
Thank You
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
Re: Importing file that is almost 30 MB
The restriction actually is imposed by PHP, and if I remember correctly, it was both upload_max_filesize and memory_limit that needed to be adjusted. Go with the import utility that astions suggested if you can, though.arya6000 wrote:I have a huge database thats about 30 MB, I used phpMyAdmin to export the database. But when I want to import it the max file is only 8MB even tho I put 30 MB in php.ini. Is 8 MB the Maximum of php upload limit?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
I've had success with bigdump in the past
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I am telling you this is a mysql server variable thing. I ran into this when trying to load a 50K record zip code table. It might be related to file size in PHP, but there is going to be an issue with the size in mysql as well.
Try breaking it into smaller chunks, or do as jcart suggested and use bigdump (which does the breaking up for you).
Try breaking it into smaller chunks, or do as jcart suggested and use bigdump (which does the breaking up for you).
Use the command line utility to import it
mysql -u user -h 67.32.121.23 -p -e "source /path/to/file/dump.sql"
Replace the ip with the IP or URL of your db server. Use localhost if running this on the server.
If your db server allows remote connections to mysql then you could do the above on your local PC. 30mb really isn't that big and would import fine over the net.
mysql -u user -h 67.32.121.23 -p -e "source /path/to/file/dump.sql"
Replace the ip with the IP or URL of your db server. Use localhost if running this on the server.
If your db server allows remote connections to mysql then you could do the above on your local PC. 30mb really isn't that big and would import fine over the net.