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: 


Today I came across with this very weird error message while trying to import my database from shell. Well….it’s not very clear what the heck is going on, but the solution is very simple. You just have to gunzip your sql.gz file before you import it.
So just run
gunzip myfile.sql.gz

#####