执行上面的代码, 即可解决, 不过mysql重启之后还会有问题. 根本解决: 将mysql的配置文件中的sql_mode项 注释掉. 转载于:https://www.cnblogs.com/mafeng/p/10886601.html