Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

`ddev import-db` – Error: Unknown command '\-'

I’m trying to import a zipped sql dump into ddev like this: ddev import-db --file=database.sql.gz but that gives me the following error:

ERROR at line 1: Unknown command '\-'.

If I try ddev import-db < database.sql.gz I get this error:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: ''.

>Solution :

This is a result of a recent change in MariaDB dump file format. You can see the full information at https://mariadb.org/mariadb-dump-file-compatibility-change/

You’ll need to take one of the actions mentioned in that article to sort it out.

Related DDEV issue is https://github.com/ddev/ddev/issues/6083#issuecomment-2116597297

This was a very unfortunate change for MariaDB to make in a patch version of their product. People are feeling the pain all over the internet.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading