In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly describes how to solve MySQL 8.0.13 set date for 0000-00 -00 00:00:00 when the problem occurs, the article is very detailed, has a certain reference value, interested friends must read!
Error 1292: Incorrect datetime value: '0000- 00 -00' for column 'deleted_at' at row 1) was found when saving the data, and then I searched for the following reason, because MySQL does not allow this format when saving the date. Here is how the problem was solved:
First, according to Mysql database date, datetime type setting 0000-00-00 default value error reporting problem This blog operation. But it turns out. I don't have the cnf file mentioned in the article on my computer. So I searched the Internet for that file. The file/etc/my. cnf was created.
But when I'm done
sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Paste to the location of the file, or unsuccessful. MySQL does not start directly. Later, when setting sql_mode on the command line, I saw an error prompt:
mysql> SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'
ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' Then don't set it. After that, remove the sql-mode line in my.cnf file and change the value successfully.
MySQL version: 8.0.13
The above is "How to solve MySQL 8.0.13 set date to 0000-00 -00 00:00:00" All the contents of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!
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.