Nginx does not import database in phpmyadmin: "413 Request Entity Too Large"

3

I have a database of 1.31MB which I'm trying to import into my phpmyadmin, which indicates that it supports importing databases of maximum size: 2,048KB.

But, I'm not getting it ... every time I try to import it gives this message:

"413 Request Entity Too Large"

    
asked by anonymous 25.09.2015 / 06:48

2 answers

2

You should set the client_max_body_size directive to a higher value, different from the default 1MB. Its intent is to prevent customers from uploading too large since in most common cases it's just a form or a photo. Something larger than 1MB would be suspect, but not in your case. Add this to your configuration file:

client_max_body_size 5m;

I recommend not for too high a value here. Use the least that suits you.

    
27.09.2015 / 03:12
0

You need to make changes to the file php.ini

upload_max_filesize = <Tamanho Desejado>M  

Then change the server settings in Nginx. In the /etc/nginx/conf.d/default.conf file or in your server's file in the /etc/nginx/sites-available/

server {
    client_max_body_size <Tamanho Desejado>M;
    ...
}

And finally, restart the service.

# service nginx restart

Here it is working properly.

Response Retrieved from this post .

    
31.01.2017 / 13:54