Copying a mysql database generates "ERROR: unknown command" when importing

mysql

Solution

mysql --default-character-set=utf8 db < dump.sql

Problem

I'm on a japanese system using xampp. This is the line I use to dump my database. ``` c:\xampp\mysql\bin>mysqldump.exe -uroot wp_newsja > dump.sql ``` Then I create a database on another server. ``` c:\xampp\mysql\bin>mysqladmin -uroot create db ``` But when I try to execute the sql... ``` c:\xampp\mysql\bin>mysql -uroot db < dump.sql ``` ... I get the following error. ``` ERROR at line 145: Unknown command '¥''. ``` On a japanese computer windows path slashes / are represented with "¥". Which leads me to believe this is an utf8 issue. Maybe there is a way I can mysqldump with some utf8 flag? Thanks for any assistance! The exported sql is here: http://goo.gl/7MPVG - Error at line 145: edit: Problem solved: ``` mysql --default-character-set=utf8 db < dump.sql ``` Sorry if I wasted anyone's time.

Original source