mysql5.6导入旧版本数据时遇到几个错误该如何修改呢?


http://segmentfault.com/img/bVm9aZ 请问这3条应该怎么改成mysql5.6的标准呢?菜鸟请大虾直接把正确答案写出来,非常感谢

另外请问这3条记录如果不插入新数据库的话, 可能会导致什么样的BUG呢?


Discuz! Multi-Volume Data Dump Vol.1

Version: Discuz! X3.2

Time: 2015-8-13 19:47

Type: discuz_uc

Table Prefix: pre_

Discuz! Home: http://www.discuz.com

Please visit our website for newest infomation about Discuz!

SET NAMES 'utf8'

【失败原因】:
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 '?>

Discuz! Multi-Volume Data Dump Vol.1

Version: Discuz! X3.2

Time: 2015-8' at line 1

phpmyadmin 数据库 mysql mysql优化 sql

小贝尔、喵 9 years, 4 months ago

如果非要你现在的这些值的话,就把以前的两个数据(id为20150813 和 id为'1','17')从数据库彻底删掉,
然后重新插入

朴实无华的面包 answered 9 years, 4 months ago

主键不允许重复,数据id重复,肯定插不进数据库。

1.想要更新数据,就使用update语句。

2.想要插入新的数据但不冲突的话


 2.1 改变插入数据的主键id
2.2 删掉原有数据或改变原有数据的id

xxmnzc answered 9 years, 4 months ago

Your Answer