SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column 'xxx' at row 1
mysql5.7 datetime 默认值为‘0000-00-00 00:00:00'值无法创建问题解决
mysql5.7报错this is incompatible with sql_mode=only_full_group_by
select @@sql_mode;
解决办法:
不要加STRICT_TRANS_TABLES
执行如下命令即可
set @@global.sql_mode ='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';