15,041
edits
| Line 502: | Line 502: | ||
== Miscellaneous Tool-Specific Errors == | == Miscellaneous Tool-Specific Errors == | ||
=== 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 === | |||
Message: {{kbd | key=<nowiki>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: ''.</nowiki>}} | |||
Condition: When I import the sql file and I met the above error message. | |||
Solution: Unzip the file and then import the file again <ref>[https://stackoverflow.com/questions/17158367/enable-binary-mode-while-restoring-a-database-from-an-sql-dump mysql - Enable binary mode while restoring a Database from an SQL dump - Stack Overflow]</ref>. The sql file is a compressed file. You may use [https://en.wikipedia.org/wiki/File_(command) file (command)] for recognizing the type of file. | |||
<pre> | |||
$ file compressed.sql | |||
compressed.sql: gzip compressed data | |||
$ file plain_text.sql | |||
plain_text.sql: UTF-8 Unicode text, with very long lines | |||
</pre> | |||
== References == | == References == | ||