It's a little bit cool. With mysql5.x above version error #1929 incorrect datetime value: ' For column ' createtime ' workaround

Source: Internet
Author: User
Tags mysql version

After my MySQL installation, save delete table data always appears #1929 incorrect datetime value: ' For column ' createtime ' ERROR alert, resulting in the inability to delete tables data;

Reason:

More than 5 versions should be written null if the time period is null;

The official explanation said: "The new version of MySQL to insert a null value" bug,

To remove the default checkmark when installing MySQL, enable strict SQL mode

So what if we install MySQL, the workaround is to change the configuration in MySQL My.ini

Workaround:

Modify the My.ini configuration file, it is recommended to modify the pre-new backup,

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"

No_zero_date,no_zero_in_date the Red label , delete the save 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",

Strict_trans_tables the Red label , delete the save restart MySQL;

It's a little bit cool. With mysql5.x above version error #1929 incorrect datetime value: ' For column ' createtime ' workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.