How to Increase Import Size Limit in phpMyAdmin
Does anyone know if or how you can increase the import size limit in phpMyAdmin? Currently my server is limited to 50MB.
Please note that this is not the same as the
upload_max_filesize in php.ini. That value is set to 2MB.
I need to import a table into one of my DBs and the phpMyAdmin restriction of 50MB on the import is preventing me from doing that.
Amended -- attached are 2 screen shots:
Screen Shot #1 -- phpinfo() showing the php.ini settings. Screen Shot #2 -- showing the phpMyAdmin import restriction
Could you also increase
post_max_size and see if it helps?
Uploading a file through an HTML form makes the upload treated like any other form element content, that's why increasing
post_max_size should be required too.
Update : the final solution involved the command-line:
To export only 1 table you would do
mysqldump -u user_name -p your_password your_database_name your_table_name > dump_file.sql
and to import :
mysql -u your_user -p your_database < dump_file.sql
'drop table your_tabe_name;' can also be added at the top of the import script if it's not already there, to ensure the table gets deleted before the script creates and fill it
If you are using WHM/Cpanel then in order to change that "Max: 50MiB" limit in the import section of phpmyadmin, you will have to change two values in WHM (Web Host Manager).
Step 1) Go to Tweak settings, find the "cPanel PHP Max upload size" change it according to your needs. Save changes.
Step 2) Go to Tweak settings, find the "cPanel PHP Max POST size" change it according to your needs. Save changes.
Go back to your phpMyadmin. The value should have changed.
Full details here:
Read more... Read less...
I had the same problem with my working correctly by doing the following
changes into the php.ini file
post_max_size = 800M upload_max_filesize = 800M max_execution_time = 5000 max_input_time = 5000 memory_limit = 1000M
now restart for the changes to take effect
I had the same problem. My .sql file was 830 MB and the phpMyAdmin import size allowed was 50MB (just as shown in the screenshot). When I zipped the file to .zip its size became about 80 MB. Then I zipped it to bzip2 format, and I was amazed to see that the file size was compressed to just 12MB (from 830MB to 12MB!!!). As phpMyAdmin allows three compression types i.e. .zip , .gzip and .bzip2 , therefore I uploaded the compressed bzip2 file and viola.... it was imported to the database!!! So by using the right compression, I was able to import a 830MB .sql file into phpMyAdmin.
NOTE: phpMyAdmin import page clearly instructs that the compressed filename should be like filename.sql.bz2 . It should not be like filename.bz2 .
NOTE 2: You can compress your .sql file to bzip2 compressed file using 7-Zip software. cPanel also has an option to compress a file to bzip2 format.
First you have to change values in php.ini file as per your requirements.
post_max_size = 1024M upload_max_filesize = 1024M max_execution_time = 3600 max_input_time = 3600 memory_limit = 1024M
Note - Change these values carefully. These values will impact for all of your projects of that server.
Now, If above solutions are not working, kindly check your phpmyadmin.conf file. If you are using WAMP so you can find the file in "C:\wamp64\alias".
You have to change below values.
Values already in file are -
php_admin_value upload_max_filesize 128M php_admin_value post_max_size 128M php_admin_value max_execution_time 360 php_admin_value max_input_time 360
Change above code to -
# php_admin_value upload_max_filesize 128M # php_admin_value post_max_size 128M # php_admin_value max_execution_time 360 # php_admin_value max_input_time 360
Now just restart your server, to work with changed values. :)
this is due to file size import limit in phpmyadmin, default is very low, so you should increase upload_max_filesize you can change this in your php.ini, replaced with this
upload_max_filesize = 100M
If you have direct root SSH access to the machine you will be able to change the settings in: /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
Just change the line: upload_max_filesize = 50M