I have a website hosted on DreamHost that I’d like to run from Local. I’ve created an archive of the site using Duplicator, but when importing the archive into Local I run into a database error. This is what appears in the logs:
"stack":"Error: ERROR at line 24: 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.
When I’ve looked up the issue, I mainly see people recommending to unzip the file before importing, but as far as I can tell that does not seem to work for running on Local. Is there something else that can be done? Where would I set --binary-mode in the first place?
The main difference would be that instead of the wpcli command in the help doc, I think you’ll need to use the raw MySQL command, using the DB_NAME, DB_USER, and DB_PASSWORD that are set in the wp-config.php file. By default, Local sites use local, root and root for those values, so instead of:
wp db import your-database-filename.sql
I think you’d want something like this (using the actual name of the sql file):
mysql --binary-mode -uroot -proot local < database-dump.sql
Hope that helps give you a little direction! Let us know how it goes!