--compatible 模式无效:mysql40

Invalid mode to --compatible: mysql40

我在我的 MacBook 上安装了 MYSQL 8.0.12(下载版本)。当我尝试转储 mysql40 的兼容版本时,出现错误 Invalid mode to --compatible: mysql40。我 100% 相信这就是它的完成方式。不是吗? mysql 网站 mentioned how to use it.

mysqldump -u root -p --compatible=mysql40 db_name > file.sql

Invalid mode to --compatible: mysql40

我检查了 mysql 8 中的兼容文档:

--compatible=name

Produce output that is more compatible with other database systems or with older MySQL servers.

The only permitted value for this option is ansi, which has the same meaning as the corresponding option for setting the server SQL mode. See Section 5.1.10, “Server SQL Modes.

参见:https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html#option_mysqldump_compatible