After I installed MySQL, when I tried to save and delete table data, I always got an error message #1929 Incorrect datetime value: '' for column 'createtime', which prevented me from deleting the table data. Cause Analysis: For versions above 5, if the period time is a null value, NULL should be written; The official explanation is: It is known that the new version of MySQL has a "bug" in inserting null values. To remove the default check of enable strict SQL mode when installing MySQL So what if we have installed mysql? The solution is to change the configuration my.ini in mysql Solution: Modify the my.ini configuration file. It is recommended to make a new backup before modifying it. Find sql-mode in my.ini, My MySQL version is 5.7.9, the default is: sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE ,NO_ZERO_IN_DATE, NO_AUTO_CREATE_USER" Delete the red marked NO_ZERO_DATE, NO_ZERO_IN_DATE , save and restart MySQL; If the version is low, the default may be: The default is sql-mode=" STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION ", Delete the red marked STRICT_TRANS_TABLES , save and restart MySQL; The above is a quick solution to the error #1929 Incorrect datetime value: '''' for column ''createtime'' that occurs when using Mysql5.x or above. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Setting up shadowsocks+polipo global proxy in Linux environment
>>: Native js implements custom scroll bar component
Prepare the database (MySQL). If you already have...
eureka: 1. Build a JDK image Start the eureka con...
Verification environment: [root@~~/]# rpm -qa | g...
1. Overview The Promise object is a specification...
Table of contents 1. HttpGET 2. HTTP POST WebSock...
Table of contents 1. Get request: 2. Post request...
Here is a Vue single sign-on demo for your refere...
<br />Question: How to write in HTML to jump...
<br />Previous article: Web Design Tutorial ...
Basically all e-commerce projects have the functi...
This article shares the specific code of Vue+Webs...
Problem Description In our projects, horizontal t...
In order to avoid repeatedly entering the Docker ...
Question: Although the index has been created, wh...
Many of my friends may encounter a problem and do...