首页 > 未分类 > Field ‘id’ doesn’t have a default value问题解决方法
2013
01-07

Field ‘id’ doesn’t have a default value问题解决方法

MySQL 5中,出现错误提示:
 Field 'id' doesn't have a default value
 
解决方法一:
 
打开my.ini,查找
 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
 
修改为
 
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
 
然后重启MYSQL
 

解决方法二:
 MySQL 5 uses a strict mode which needs to be disabled.
 In Windows, Goto Start-->Programs-->MySQL->MySQL Instance Config Wizard. Follow through the Reconfigure Instance option-->Detailed Configuration-->Continue Next a few screens. At the bottom under Enable TCP/IP option there is 'Enable Strict Mode'. Deslect this option (no tick). Save changes and MySQL will restart
最后编辑:
作者:NINE
这个作者貌似有点懒,什么都没有留下。

Field ‘id’ doesn’t have a default value问题解决方法》有 1 条评论

留下一个回复

你的email不会被公开。