Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 960
Ghostman Avatar asked Dec 03 '11 07:12

Ghostman


People also ask

How do I increase MySQL import limit?

Import Large Database in XAMPP – MySQL:Press Ctrl+F and search for upload_max_filesize=20M to upload_max_filesize = 128M . Search for post_max_size and change it to post_max_size = 128M . Search max_execution_time replace the 30 to 300. just like that max_execution_time = 300 .

What is the maximum size of a data file you can import with PHPMyAdmin?

By default in phpMyAdmin the maximum file size upload limit is 2MB.


1 Answers

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
like image 103
James Williams Avatar answered Oct 13 '22 09:10

James Williams