In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Scene
[Err] 1067-Invalid default value for 'create_date', for creating a table type is as follows:
`create_ date`timestamp (0) NOT NULL ON UPDATE CURRENT_TIMESTAMP (0) COMMENT 'creation time'
Solve
MySQL5.6.44 and MySQL5.7.27timestamp default value rule change, cannot be "0000 00-0000: 00:00"
Solution:
View sql_mode:
Mysql > show session variables like'% sql_mode%'
+- -- +
| | Variable_name | Value |
+- -- +
| | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+- -- +
1 row in set (0.01 sec)
Modify sql_mode to remove NO_ZERO_IN_DATE,NO_ZERO_DATE:
Mysql > set sql_mode= "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.