PhpMyAdmin restriction on the size of the uploaded file

These actions are necessary if you need to import a large database from a sql dump using phpMyAdmin. With such an import, the following error may appear.

This error indicates that the file size is larger than the limit allowed by the php parameters. Accordingly, it is necessary to change these parameters. There are two required options, these are upload_max_filesize and post_max_size. The first one specifies the maximum file size for uploading, the second one specifies the maximum size of the POST request (by this method PHP saves the file). The record data is located in the php.ini file. You can find its location with the following command.

# php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini

The second option is to simply start a search for a file containing this parameter.

# grep -iRI upload_max_filesize /etc/
/etc/php.ini:upload_max_filesize = 2M

After the file is found, you should open it with any convenient text editor, find the indicated variables and change their values, as required by your uploaded file.

upload_max_filesize = 60M
post_max_size = 60M

In this example, the test file is about 50 MB, so 60 MB is selected. After that, we restart the service that processes php (in this case, apache, possibly php-fpm instead)

# service httpd restart

After restarting, we return to the Import menu and see that the maximum size of the uploaded file has changed