34

Im trying to import the database of my client side (wordpress platform) to localhost (using xampp).

Other clients' sites work OK, except for this one particular site. When I want to import it, it just showed "phpMyAdmin - Error. Incorrect format parameter". The error image

I tried googled it, but it's like no one having this error when importing a database.

Do you guys have any idea? Feel free to ask anything, I'm not sure what information I need to provide since I just using quick exporting and the import setting I just let it remain default.

iceiceicy
  • 705
  • 1
  • 9
  • 24

7 Answers7

94

I had the same problem recently.

I did these 3 things and it worked:

  1. Made sure the Collation of the exported database is the same as the newly created one.

  2. Made these changes in my php.ini(xampp/php/php.ini) file

    max_execution_time = 5000
    max_input_time = 5000
    memory_limit = 1000M
    post_max_size = 750M
    upload_max_filesize = 750M
    
  3. Made this change in my \phpmyadmin\libraries\config.default.php file:

change

$cfg['ExecTimeLimit'] = 300;

to

$cfg['ExecTimeLimit'] = 0;

(So there is no limit)

Kal-El
  • 1,046
  • 8
  • 9
  • 5
    config.default.php header states "DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!!" – Navidot Aug 11 '18 at 09:36
  • In XAMPP 7.2.10-0 for Linux the php.ini file is at: `/opt/lampp/etc/php.in`. – Shai Sep 26 '18 at 18:02
  • 1
    I went to my WHM->Tweak Settings to get this to work. The cPanel php.ini didn't work. Just a FYI – Shirley Ashby Feb 23 '19 at 22:55
  • In my case I change only this row : $cfg['ExecTimeLimit'] = 0; and it's work now, thanks – Rafael Moura May 23 '19 at 13:04
  • thank you very much for the solution, it solved my problem, but I would add the step 4) Stop Apache, stop MySQL and restart them again before the importation. I know you should know it, but sometimes people could forget it, It was my case today. Only after stop and restart the modified settings were taken. – Jose Jun 16 '19 at 19:50
  • I did stop and start the Apache, MySQL to make this effect. Thanks, it worked finally. – Shailendra Madda Jan 24 '20 at 11:44
  • In XAMPP (version 7 and 8) for MAC the php.ini file is at: /Applications/XAMPP/xamppfiles/etc/php.ini – gmm Feb 25 '21 at 14:33
16

Another solution would be to compress the sql file in .zip and upload it

Anselmo
  • 171
  • 1
  • 3
3

I have had the same problem that is mentioned and the solution has been to compress it in a .zip and upload it since it weighed more than 40mb which is the maximum import. This has solved the problem.

0

In my case, I was importing the database and I didn't select a database and I was trying to import, so make sure you have selected a database before importing

NIMISHAN
  • 1,265
  • 4
  • 20
  • 29
M.suleman Khan
  • 576
  • 6
  • 17
-1

If you see the error immediately after uploading the file

  1. Make sure the character set of old database matches with the new one

If you see the error after few seconds of uploading the file Try editing your php.ini file

max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
post_max_size = 750M
upload_max_filesize = 750M
-2

skip the phpmyadmin and talk to mysql immediately, then you will be very happy.

mysql >> create database db_name;

mysql >> exit;

console >> mysql -u root -p db_name < db_to_import_path

just that .

Khlil
  • 9
  • 3
-2

First of all make sure that you created the db for the file