phpMyAdmin - Error > Incorrect format parameter?
I have a WordPress production website.
I've exported the database by the following commands: select database > export > custom > select all tables > select .zip compression > 'Go'
I've downloaded the file which is example.sql.zip but when I upload to my localhost I get this error: phpMyAdmin - Error > Incorrect format parameter
I've tried to export with other formats and I get the same error.
I've tried with other SQL Databases and it exports/ imports just fine.
What could it be? A corrupt database or other?
Thanks
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