Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT or UPDATE. This can be for any reason like if strict mode is enabled, division by zero produces an error. Date as ‘0000-00-00’ is not permitted and produce an error. This tutorial will help you for disabling the strict SQL mode in MySQL server 5.7 or later versions.

Disable Strict SQL Mode

You can do it by editing mysqld.cnf on your server. But for this tutorial, I will create a separate configuration file to disable strict SQL mode in MySQL server. Add the below content and save file. Now restart MySQL service to apply changes.

Verify SQL Mode

Login to the MySQL console and execute below query to find the values of sql_mode variables.

You will find results like below screenshot. Make sure ONLY_FULL_GROUP_BY and STRICT_TRANS_TABLES are not there in the result.

How to disable Strict SQL Mode in MySQL   TecAdmin - 6