views:

62

answers:

2

I need to import an database(sql file) which is about 120M is size, but in phpmyAdmin, it is not allowed to import more than 8 MB.

How to solve this?

+5  A: 

IIRC there is no limit in PHPMyAdmin nor is there in MySQL - the limit is on the POST size (webserver config) or the file upload size (php.ini). If you can't change either of these, then you'll need to upload the file by other means then ....

mysql -u username -p <mysql_export_file.sql

If you can't upload files / have no shell access / have no CLI version of the mysql client avaialable, then the next thing to try is to see whether you can connect remotely using the mysql CLI client:

mysql -u username -h www.example.com -p 

If this connects OK, then exit and run it again piping in the exported file

mysql -u username -h www.example.com -p <mysql_export_file.sql

If that doesn't work then you'll need to either split the export file into multiple smaller chunks or write your own dataloader which trickles the data.

C.

symcbean
additionally, he could stick with phpMyAdmin and 'simply' split the dump into easily digestible <8MB chunks.
sfussenegger
@sfussenegger: how do you do that **'simply'**?
symcbean
@symcbean it's not that simple, hence the quotes ;) I just wanted to add this possibility as remark to your answer.
sfussenegger
+1 the easiest way to import a large database using phpMyAdmin is not to use phpMyAdmin.
Pekka
A: 

I don't have direct access to server, so successfully used BigDump istead. You upload it via FTP together with big SQL file. Then BigDump imports the local file on server, avoiding any HTTP/PHP upload limits.

Juraj