Questions? Feedback? powered by Olark live chat software
Knowledgebase
Author Avatar

Disabling Strict Mode for MySQL 5.7+

Written by: on 16 June 2020 05:12 PM 16 June 2020 05:12 PM

Upgrading from MySQL 5.6 or lower up to 5.7 or higher may find some of your application incompatible with STRICT mode. This mode controls how MySQL handles invalid or missing values. See: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict

First you should upgrade the MySQL server. Once it has been upgraded you can disable STRICT mode.

To disable STRICT mode you need to edit the file at /etc/my.cnf and add the following line to the bottom of the file:

sql_mode=""

Once that is done restart MySQL and you should be safe to upgrade without affecting any running websites

(0 vote(s))
Helpful
Not helpful