MySql导入sql脚本及错误ERROR 1064 (42000)

标签:
数据库大文件导入error1064(42000) |
分类: 计算机 |
我的用户名是root 密码是123 sql脚本存在C盘 名字为test.sql 数据库为test
2:打开CMD输入以下命令(进入mysql的bin目录)
d:\mysql\bin>mysql -u root -p123 test < c:/test.sql
错误:ERROR 1064 (42000): 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 'TYPE=MyISAM ' at line 6
![MySql导入sql脚本及错误ERROR <wbr>1064 <wbr>(42000)]()
解决:
1、用文本编辑器打开sql文件;
2、查找/替换,将数据库文件内的所有TYPE=MyISAM修改为ENGINE=MyISAM,保存退出;
3、重新执行sql文件即可。
有两种方法可以执行脚本
1:打开CMD输入以下命令(不需要转换目录)
>mysql -u root -p123
进入MYSQL后
mysql>use test;
mysql> source
c:/test.sql
2:打开CMD输入以下命令(进入mysql的bin目录)
d:\mysql\bin>mysql -u root -p123 test < c:/test.sql
错误:ERROR 1064 (42000): 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 'TYPE=MyISAM ' at line 6
解决:
1、用文本编辑器打开sql文件;
2、查找/替换,将数据库文件内的所有TYPE=MyISAM修改为ENGINE=MyISAM,保存退出;
3、重新执行sql文件即可。
前一篇:分治算法