When we work with DatabaseMost handy is us phpMyAdmin, We provide management support bases given eprin web interface. From phpMyAdmin we can make any changes in a database to which we have access. We can add databases, create, delete and edit tables in databases, we can remove or import databases maintained.
In the standard configuration (default) function "Import"in phpMyAdminDoes not allow us to do upload in MySQL the files larger 2MB (2,048 KiB). If we have an important database of more than 2 MB, then comes the error: "You probably tried to upload too large file. Please referer to documentation for ways to workaround this limit. "
One solution would to compress the database (.sql file) in one of the formats gzip, bzip2 or zipBut if the file is very large database, then certainly not any compression under 2MB to get a file that can be imprtant by phpMyAdmin. The only solution is to change the allowed size limit for uploads.
Change Upload / Import Size Limit in phpMyAdmin
Import limit is given by configuration PHPSite, and to change this limit will have to edit the configuration file responsible for PHP (php.ini).
Depending on your system, php.ini can be located in "/ etc / php.ini", "/ etc / php5 / apache2 / php.ini" or in another location on web server. The easiest to locate it is we login to the server (via SSH) And give the command line "locate php.ini". After you locate the file php.ini, move on to editing it.
Php.ini file search, and edit these 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 apr spend parsing request data (def. 60)
memory_limit = 128M ; Maximum amount of memory a script apr consume (def. 128mb)
upload_max_filesize = 200M ; Maximum allowed size for uploaded files. (Def. 2mb)
post_max_size = 180M ; Maximum size of POST date PHP That Will accept.
In our case we set the maximum size of the file to be imported is not less than 180MB. That means we can import via phpMyAdmin database to 180MB.
In Funt your needs change execution time and memory limit used. If the times set in php.ini are low and the imported file is very large, it may give the error "time out"Import. For it will have to change"max_input_time"And"max_execution_time. "This is true for memory limit, which should be increased in case of large databases. After you make changes, using the editor" nano ", press Ctrl + X then "Y"(Yes) and Enter to save the changes.
The last step is restarting Apache Web Server.
service httpd restart
After the restart of Apache you can start importing the file with the database.
Stealth Settings – Import Size Limit Change in phpMyAdmin.