`
Beaver's
  • 浏览: 394578 次
  • 性别: Icon_minigender_2
  • 来自: 天津
社区版块
存档分类
最新评论

You have an error in your SQL syntax; check the manual that corresponds to ...

阅读更多
使用命令行窗口恢复MySQL数据库,命令如下:
>mysql -uroot -p123456 sn<sn.sql

sn是事先创建的数据库。恢复过程中出现错误提示:
引用
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'

仔细对照,原来是数据库的版本问题,出现问题的语句是:
PRIMARY KEY (`PID`) USING BTREE 
这是备份的sql语句,但在新的数据库中要求语句格式为
PRIMARY KEY  USING BTREE (`PID`)
备份和恢复数据库的时候一定要看好版本。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics