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:
ERROR: ASCII '' 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 '' is expected. Query: ''.
0
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.