Change Upload Size Limit SQL file in phpMyAdmin

Tutorial that teaches you step by step how to change the size limit accepted for the import of SQL files into phpmyadmin. Help when you need to import big databases. Change Upload Size Limit Sql File in Phpmyadmin.

When we have work with databases, the most handy is us , which provides us with support for administration of the dating bases EPRIN the web interface. From Phpmyadmin we can make any changes we want in a database to which we have access. We can add databases, create, delete and edit tables in databases, we can delete or we can It matters Baze from dates.

In the standard (default) configuration “Import” FROM phpMyAdmin, does not allow us to upload in to files greater than 2MB (2,048 CIB). If we have an important database greater than 2 MB, then the error comes: “You probably tried to upload too large file. Please referer to documentation for ways to workaround this limit.

phpMyAdmin Upload Big Database SQL
Upload too large file in phpMyAdmin

A solution to compress the database (.SQL file) in one of the formats gzip, bzip2 or zip, but if the database file is very large, then certainly by compression we will not get a file below 2MB that can be wrapped by phpMyAdmin. The only solution is to change the limit of the limit allowed for upload.

Import SQL file in phpmyadmin
Import .sql file in phpMyAdmin

Change Upload / Import Size Limit in phpMyAdmin

Import limit is given by configuration to the limit, and to change this limit we will have to edit the file that is responsible for the PHP configuration (PHP.ini).

Depending on the system used, PHP.ini can be located in “/etc/php.ini“, “/etc/php5/apache2/php.ini” or in another location on . The simplest to locate it is to log on to the server (via ) and give the order line “locate php.ini“. After locating the php.ini file, we go to its editing.

nano /etc/php.ini
Change Upload Size Limit SQL
Change Upload Size Limit SQL

In the file php.ini We are looking for and editing the following lines:

max_execution_time = 60 ; Maximum execution time of each script, in seconds (def. 30) 
max_input_time = 90 ; Maximum amount of time each script may spend parsing request data (def. 60) 
memory_limit = 128M ; Maximum amount of memory a script may consume (def. 128mb) 
upload_max_filesize = 200M ; Maximum allowed size for uploaded files. (def. 2mb) 
post_max_size = 180M ; Maximum size of POST data that PHP will accept

In our case we have set that the maximum size of the import file should not be greater than 180MB. This means that we can import through PHPmyadmin databases up to 180MB.

Change Upload Size Limit SQL
Change Upload Size Limit SQL

Founded by your needs. Change the execution time and memory limit used. If the times set in php.ini are small and the import file is very high, then it is possible to give the error “time out” at import. For this you will need to change “max_input_time” and “max_execution_time“. This is also true for the memory limit, which must be increased in the case of large databases. After making the changes, using the editor “nano”, press Ctrl + X then “Y” (Yes) si Enter to save the changes.

The last step is the restart .

systemctl restart httpd 

or

/etc/init.d/httpd restart

After the restart of You can start importing the file with the database.

Change Import Size Limit in phpMyAdmin.

Founder and editor Stealth Settings, din 2006 pana in prezent. Experienta pe sistemele de operare Linux (in special CentOS), Mac OS X , Windows XP > Windows 10 si WordPress (CMS).

Home Your source of IT tutorials, useful tips and news. Change Upload Size Limit SQL file in phpMyAdmin

1 thought on “Change Upload Size Limit SQL file in phpMyAdmin”

  1. Old tutorial but it is still topical. Thank you!
    However, it does not work in all situations. Connection Timed Out to Upload.

    Reply
Leave a Comment