复制mysql数据库会生成"ERROR:unknown command"(错误:未知命令).导入时 [英] Copying a mysql database generates "ERROR: unknown command" when importing

查看:138
本文介绍了复制mysql数据库会生成"ERROR:unknown command"(错误:未知命令).导入时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用xampp的日语系统上.这是我用于转储数据库的行.

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

但是当我尝试执行sql ...

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 '¥''.

在日文计算机上,Windows路径斜杠/用"¥"表示.这使我相信这是utf8问题.也许有一种方法我可以用一些utf8标志进行mysqldump吗?感谢您的协助!导出的sql在这里: http://goo.gl/7MPVG -第145行出错:

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:

问题已解决:

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

对不起,如果我浪费任何人的时间.

Sorry if I wasted anyone's time.

推荐答案

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

这篇关于复制mysql数据库会生成"ERROR:unknown command"(错误:未知命令).导入时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆