Causes of the PhpMyAdmin incorrect format parameter errorIf the script needs more memory than the assigned memory value. The case when the size of the post data goes higher than the maximum post data size range. When the size of the backup file is more than the maximum file size limit.
This issue is not because of corrupt database. I found the solution from this video - https://www.youtube.com/watch?v=MqOsp54EA3I
It is suggested to increase the values of two variables in php.ini file. Change following in php.ini
upload_max_filesize=64M
post_max_size=64M
Then restart the server.
This solved my issue. Hope solves yours too.
Compress your .sql
file, and make sure to name it .[format].[compression]
, i.e.
database.sql.zip
.
As noted above, PhpMyAdmin throws this error if your .sql
file is larger than the Maximum allowed upload size -- but, in my case the maximum was 50MiB despite that I had set all options noted in previous answers (look for the "Max: 50MiB" next to the upload button in PhpMyAdmin).
For me, adjusting the 2 values was not enough. If the file is too big, you also need to adjust the execution time variables.
First, ../php/php.ini
upload_max_filesize=128M
post_max_size=128M
max_execution_time=1000
Then, ../phpMyAdmin\libraries\config.default.php
$cfg['ExecTimeLimit'] = 1000;
This did the trick for me. The variables can be choosen differently of course. Maybe the execution time has to be even higher. And the size depends on your filesize.
None of these answers worked for me. I had to use the command line:
mysql -u root db_name < db_dump.sql
SET NAMES 'utf8';
SOURCE db_dump.sql;
Done!
If you use docker-compose just set UPLOAD_LIMIT
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
UPLOAD_LIMIT: 1G
Just gone through the same problem when trying to import a CSV (400 MBs) and was also getting an error in red saying
Error - incorrect format parameter
Initially thought it could have been the parameters and tested again. Faster, from my previous experince with it, I realized that it was due to other reasons (size of the file, execution of script has a maximum time defined, etc).
So, I've gone to php.ini
and changed the values from the following settings
max_execution_time = 3000
max_input_time = 120
memory_limit = 512M
post_max_size = 1500M
upload_max_filesize = 1500M
After this modification, stoped MySQL and Apache and started them again, went to phpmyadmin trying to import. Then I reached another error
Fatal error: Maximum execution time of 300 seconds exceeded
which was fixed by simply setting in xampp/phpmyadmin/libraries/config.default.php
$cfg['ExecTimeLimit'] = 0;
Setting it to 0 disables execution time limits.
Then, after a while, the import happened without problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With