How to overcome phpmyadmin error “Incorrect format parameter” when using DDEV

When working with databases, we will usually need to import an sql file into our database. For example when setting up a live project on your local machine.

This can easily be done using PHPMyAdmin. To access PHPMyAdmin in DDEV, type

  • ddev describe
  • NB: DDEV must be configured for the project and you must be at the root of the project folder in the terminal or command line.
  • You will see information about your project but look for the part highlighted as shown in the screenshot below. For that is the link to your PHPMyAdmin.

Now there are times when the Max upload filesize for PHPMyAdmin is smaller than your sql file and hence causing the “Incorrect format parameter” error.

I had this problem with DDEV and tried increasing the upload_max_filesize and post_max_size php settings using a custom php .ini file but to no avail.

The Solution

To import my sql file I finally just used the ddev import-db command.

  • To keep things simple and organized, create a folder in the root of project folder and copy the sql file into it.
  • Assume the folder name is data and the sql file name is db.sql
  • Run ddev import-db --src=data/db.sql
  • Just wait till import is completed

Now the sql file has been imported into your database. You can check the imported data using PHPMyAdmin.

So that is it. You have just overcome the PHPMyAdmin error and ready to continue with you project.

Any questions or issues, just leave them in the comments.

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started