4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【MySQL】「Unknown command '\''.」のエラー対処法

Posted at

##経緯
DBをmysqldumpにてダンプ後、ローカルDBへインポートしようとした際に発生。

mysql -uroot database < dump.sql
ERROR at line 1 : Unknown command '\''.

##対処方法
MySQLコマンド実行時に、文字コードに「UTF-8」を指定する。

mysql -uroot --default-character-set=utf8 database < dump.sql

##補足
・Shift_JISを指定すると変わらずエラーが発生

mysql -uroot --default-character-set=sjis database < dump.sql
ERROR at line 1 : Unknown command '\''.
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?