How To Disable MySQL Strict Mode on Centos 7

How To Disable MySQL Strict Mode on Centos 7 via SSH  (STEP BY STEP )

In this tutorial you will learn how to disable the mysql strict mode on centos 7 via ssh permanently

Step 1: Login to  ssh as root  or you can do with WHM terminal

Step 2: Edit the MySQL configuration files.

Open the file with your favorite command-line editor. In this example, we use ‘nano’:

nano /etc/my.cnf

Find the following lines:


If you find a line similar to the above that is setting the `sql_mode` variable then you will need to replace it with the following line to disable MySQL strict mode:



Step 3: Use Ctrl+O to save and then enter .

Step 4: Restart MySQL with this command:

systemctl restart mysql

Step 5: verify if the  Strict SQL Mode Is Disabled.

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

Done !

Leave a Reply