使用命令行窗口恢复MySQL数据库,命令如下:
sn是事先创建的数据库。恢复过程中出现错误提示:
[quote]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'[/quote]
仔细对照,原来是数据库的版本问题,出现问题的语句是:
>mysql -uroot -p123456 sn<sn.sql
sn是事先创建的数据库。恢复过程中出现错误提示:
[quote]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'[/quote]
仔细对照,原来是数据库的版本问题,出现问题的语句是:
PRIMARY KEY (`PID`) USING BTREE
这是备份的sql语句,但在新的数据库中要求语句格式为
PRIMARY KEY USING BTREE (`PID`)
备份和恢复数据库的时候一定要看好版本。