Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不同版本中的mysql还原数据库错误_Mysql - Fatal编程技术网

不同版本中的mysql还原数据库错误

不同版本中的mysql还原数据库错误,mysql,Mysql,我有适用于Win32(ia32)的Mysql版本14.14 Distrib 5.1.34的Mysql DB转储文件 现在我想在Mysql版本14.12 Distrib 5.0.16中为Win32(ia32)恢复此转储文件 它给出了类似于 ERROR 1064 (42000) at line 278: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server versio

我有适用于Win32(ia32)的Mysql版本14.14 Distrib 5.1.34的Mysql DB转储文件

现在我想在Mysql版本14.12 Distrib 5.0.16中为Win32(ia32)恢复此转储文件

它给出了类似于

ERROR 1064 (42000) at line 278: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to use
 near 'USING BTREE,
  KEY `audit_trail_ibfk_1` (`USER_ID`) USING BTREE,
  KEY `FK_audit' at line 8
当我用同一个版本还原它时,它会工作


请建议。

我认为您遇到了一个MySQL错误,请参阅

我得到的解决方案,我们可以使用compatible选项和mysqldump命令执行相同的操作,如

mysqldump -u root --routines --compatible=mysql40 -p history < history.dump
mysqldump-u root--routines--compatible=mysql40-p history

其中mysql40与所有版本兼容..

c:\>mysql-h 192.168.100.11-u root-p history