Ghostman
Ghostman

Reputation: 6114

How to upload / import a mysql phpmydadmin database of more than 2MB

With the default settings, phpmyadmin does not allow me to upload a database of more than 2mb. How to upload or import in a mysql phpmydadmin database of more than 2MB?

Upvotes: 6

Views: 23497

Answers (4)

James Williams
James Williams

Reputation: 4216

There is a couple of ways.

1) Split your SQL file into multiple 2MB chunks

OR

2) update your php.ini file with the following (only works on dedicated/local servers - any server you have root on or ones that allow php.ini to be override)

Find:
post_max_size = 8M
upload_max_filesize = 2M
max_execution_time = 30
max_input_time = 60
memory_limit = 8M

Change to: ( or any size you want but it will depend on your server resources )
post_max_size = 35M
upload_max_filesize = 35M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M

3) If you do have root run a command line

mysql -u username -p -D database_name < file

Upvotes: 28

user916315
user916315

Reputation: 1037

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

This splits the dump files into small chunks and uploads them automatically.

Upvotes: 0

Tudor Constantin
Tudor Constantin

Reputation: 26861

Archive that dump in a .tar.gz file and upload that file

Upvotes: 2

Trott
Trott

Reputation: 70153

The 2 Mb limit on file uploads is a default setting in PHP so you'll need to increase it in your php.ini file. http://www.php.net/manual/en/features.file-upload.common-pitfalls.php Note that more than one setting may need to be increased.

Upvotes: 0

Related Questions