Knowledgebase: MYSQL
How to Disable MySQL Strict Mode

logged into SSH with the root user, do the following:

1 . Make backup


cp -a /usr/my.cnf /usr/my.cnf-bak
cp -a /etc/my.cnf /etc/my.cnf-bak

2. edit configuration file

nano /usr/my.cnf
nano /etc/my.cnf

Change the below

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

to

sql_mode=""

3. Restart the MySQL Service


For CentOS 7 servers:
systemctl restart mysql

For CentOS 6 and prior:
/etc/init.d/mysql restart


4) Verify
To verify that the process was completed properly you can run the following:

mysql -e "SELECT @@sql_mode;"

The output may look similar to the following:

+--------------------------------------------+
| @@sql_mode
+--------------------------------------------+
| NO_AUTO_CREATE_USER
+--------------------------------------------+

Comments (0)