How can i disable MySQL strict mode ?
Steps to disable mySQL strict mode
Overview: This article explains how to disable MySQL strict mode. You can either run a SQL command to set sql_mode to 'NO_ENGINE_SUBSTITUTION' or adjust the sql_mode setting in the my.cnf file. After making these changes, restart MySQL to apply them.
MySQL strict mode is enabled by default. You can disable it in a couple of ways.
Step 1. To Disable Strict Mode via SQL :
You can disable strict mode on your MySQL server by running the following command on your Linode’s command line :
mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"
You can set other values for sql_mode as well. See sysvar sql_mode in the MySQL Documentation for a list.
Then, you can verify that the mode is set by running the following :
mysql -u root -p -e "SELECT @@GLOBAL.sql_mode;"
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Related Articles