解决方案参考:https://blog.csdn.net/hyp187/article/details/102721830
总结就是版本问题导致:
使用参考链接中的方案一就解决了,主要是设置 session、global(当前有效,重启MySQL服务后失效,永久生效设置mysqld文件)
select version()
show session variables where variable_name = 'sql_mode'
set session sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
show global variables where variable_name = 'sql_mode'
set global sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'