描述:mysql5.7执行sql语句导入时报错
mysql 5.7 Error : Incorrect datetime value: '0000-00-00 00:00:00' 报错。
因为mysql 5.7后
The TIMESTAMP
data type is used for values that contain both date and time parts. TIMESTAMP
has a range of '1970-01-01 00:00:01'
UTC to '2038-01-19 03:14:07'
UTC.
解决办法:
把数据库脚本中的 0000-00-00 00:00:00 替换为 1970-01-01 00:00:01 就可以了