phpMyAdmin import file size 2M limit

19,415

Solution 1

I checked with my DigitalOcean technical support and found out the reason: I restarted Nginx, but haven't restarted php-fpm which is the PHP process for Nginx.

After I tried service php7.0-fpm restart, phpMyAdmin is showing (Max: 150MiB) for importing limit now. And the importing works!

Solution 2

You must change the mysql server settings too my.ini or my.cnf file by including the single line under [mysqld] section:

max_allowed_packet=500M

Then restart the MySQL server. In case of 500M is not enough use another value.

Share:
19,415
John Mccandles
Author by

John Mccandles

Updated on June 15, 2022

Comments

  • John Mccandles
    John Mccandles almost 2 years

    I was using phpmyadmin (Version information: 4.0.10deb1) on php 7.0.7 & nginx 1.4.6 . When I was trying to import a csv file to one of tables, I saw the max size allowed indicated on the phpmyadmin screen is 2,048KiB . Then I changed settings in php.ini (both /etc/php/7.0/fpm/php.ini & /etc/php/7.0/cli/php.ini):

    upload_max_filesize = 150M
    post_max_size = 150M
    memory_limit = -1
    max_execution_time = 5000
    max_input_time = 5000
    

    changed setting in /etc/nginx/nginx.conf:

    client_max_body_size 150M;
    

    and restarted nginx:

    service nginx restart
    

    but nothing changed. And the import would fail. How could I fix this issue? Thanks.