如何更改 mysql 转储文件的编码

发布于 2024-12-08 03:38:34 字数 203 浏览 2 评论 0原文

如何更改 mysql 转储文件的编码? 当我运行 mysqldump 命令时,它会创建以 ANSI 编码的文件。怎么改成utf-8呢?我也尝试过这样做:

mysqldump --user=user1--password=pas1 --default-character-set=utf8 mydb1 mytbl1 > e:\1.sql

How to change encoding of the mysql dump files?
When I run mysqldump command it creates file encoded in ANSI. How to change it to utf-8? I have also tried to do this:

mysqldump --user=user1--password=pas1 --default-character-set=utf8 mydb1 mytbl1 > e:\1.sql

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风筝在阴天搁浅。 2024-12-15 03:38:34

根据此论坛帖子,罪魁祸首是 > Windows 上的 filename 重定向,这似乎在处理 UTF-8 字符时遇到问题。

尝试使用 --result-file参数代替。

According to this forum thread, the culprit is the > filename redirection on Windows, which seems to have trouble with UTF-8 characters.

Try using the --result-file parameter instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文