mysql4.0数据库导入到mysql5.0数据库中错误
2012-05-30 11:29
267 查看
因工作需求,需要把mysql4.0.17中的数据库导入到mysql-5.5.21中,但是在导入的错误中遇到了大量错误,现将错误贴出供自己以后方便!!!
1.第一次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/9999.sql
ERROR 1064 (42000) at line 11: 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 10
解决办法:
原因:编写数据库的版本比当前安装的版本不相同。
解决:
1、用文本编辑器打开9999.sql;
2、查找/替换,将数据库文件内的所有TYPE=MyISAM修改为ENGINE=MyISAM,保存退出;
3、重新导入9999.sql即可。
2.第二次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/8888.sql
ERROR 1064 (42000) at line 89: 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=InnoDB' at line 10
解决办法:
TYPE=InnoDB修改成ENGINE=InnoDB;
3.第三次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/7777.sql
ERROR 1064 (42000) at line 368: 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 'read
int(11) default '0',
content text,
PRIMARY KEY (id)
) ENGINE = MYISAM' at line 8
解决办法:
CREATE TABLE news (
`id` int(11) NOT NULL auto_increment,
`type` int(11) default NULL,
`title` varchar(200) default NULL,
`source` varchar(50) default NULL,
`author` varchar(50) default NULL,
`addtime` int(11) default '0',
`read` int(11) default '0',
`content` text,
PRIMARY KEY (`id`)
)ENGINE=MyISAM;
原因:一般不要用关键字(read属于关键字)做表明,如果关键字做表名,sql语句中要使用[](或是``)括起来
导入成功
本文出自 “八爪鱼” 博客,请务必保留此出处http://bazhuayu.blog.51cto.com/1441282/882404
1.第一次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/9999.sql
ERROR 1064 (42000) at line 11: 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 10
解决办法:
原因:编写数据库的版本比当前安装的版本不相同。
解决:
1、用文本编辑器打开9999.sql;
2、查找/替换,将数据库文件内的所有TYPE=MyISAM修改为ENGINE=MyISAM,保存退出;
3、重新导入9999.sql即可。
2.第二次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/8888.sql
ERROR 1064 (42000) at line 89: 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=InnoDB' at line 10
解决办法:
TYPE=InnoDB修改成ENGINE=InnoDB;
3.第三次导入
[root@CentOS62 ~]# mysql -uroot -p ceshi < /root/download/7777.sql
ERROR 1064 (42000) at line 368: 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 'read
int(11) default '0',
content text,
PRIMARY KEY (id)
) ENGINE = MYISAM' at line 8
解决办法:
CREATE TABLE news (
`id` int(11) NOT NULL auto_increment,
`type` int(11) default NULL,
`title` varchar(200) default NULL,
`source` varchar(50) default NULL,
`author` varchar(50) default NULL,
`addtime` int(11) default '0',
`read` int(11) default '0',
`content` text,
PRIMARY KEY (`id`)
)ENGINE=MyISAM;
原因:一般不要用关键字(read属于关键字)做表明,如果关键字做表名,sql语句中要使用[](或是``)括起来
导入成功
本文出自 “八爪鱼” 博客,请务必保留此出处http://bazhuayu.blog.51cto.com/1441282/882404
相关文章推荐
- 往mysql导入数据库的错误:MySQL server has gone away
- .mysql 数据库导入错误:40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- mysql 数据库导入 导出,解决 导入 错误问题
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- mysql导入数据库时出现40101错误解决方法
- mysql 数据库导入错误:40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET
- MySql 数据库导入"Unknown command '\n'."错误解决办法
- 【mysql】线上数据库sql文件导入本地错误的一种解决方案
- 如何使用SQLyog备份和导入mysql5.0数据库
- 使用sqoop 1.4.4从mysql向hdfs导入表出现链接数据库失败错误的解决办法
- Mysql导入数据库时提示Unknown command ‘\n’错误的解决方法
- Mysql 一次性备份导出/导入恢复所有数据库
- mysql 执行 大数据 sql文件 与 集群结构 授权 数据库导出导入
- Mysql导入sql脚本到数据库
- Mysql 一次性备份导出/导入恢复所有数据库
- 数据库偶尔出现MySQL server has gone away 错误