One of the issue I ran in to this week was the default upload size of PHPMyAdmin for Importing SQL in to a database. The .sql file was exported from a DB and all of the queries were none DB specific. Rather than trying to edit a few hundred very long queries to be able to execute from MySql command line it was a lot easier to increase these limits in PHPMyAdmin.

My file in question was a little under 100MB, even after hard compression to .gz I could not get the file to under 30MB. A little muddling around show that it appeared to be limits imposed in the PHP.ini file rather than by PHPMyAdmin, there were 2 variables that needed updating.

 php |  copy code |? 
1
post_max_size = 8M

And

 php |  copy code |? 
1
upload_max_filesize = 10M

By changing these values both to 100M PHPMyAdmin accepted and executed the file with out an issue. You may also need to change the below variables if your file needs extracting by PHPMyAdmin

 php |  copy code |? 
1
memory_limit = 128M

Remember after a change to the php.ini file you will need to restart the process for them to take affect. Also I wouldn’t advise having these settings on a public folder or file. Rather than editing the PHP.ini file you may wish to use htaccess to change these variables without restarting the server.

 php |  copy code |? 
1
php_value  upload_max_filesize  100M
2
3
php_value  post_max_size  100M
4
5
php_value  memory_limit  128M 

 

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
© 2014 Altroleet Suffusion theme by Sayontan Sinha