Disable MySQL strict mode

Many third party scripts viz. Cubecart, WHMCS etc. require to disable MySQL strict mode. If you do not disable MySQL strict mode, you may receive errors during installation.

The most commons errors are as follow:

My SQL Error 1048 column description cannot be null
 Incorrect integer value: '' for column 'id' at row 1
 Field 'xyz' doesn't have a default value

To disable MySQL strict mode, you will need your server’s root or administrative access. You will need to edit “sql-mode” value in your MySQL configuration file (my.ini or my.cnf).

For Linux server, you will need to add the following:


For Windows server, you can follow the below steps:

# The following line will set MySQL strict mode


To disable MySQL strict mode, you can change the above line as follow:


After making the above changes, you will have to restart your MySQL service.

Note: After sql_mode= and sql-mode=, there is double quote. It may be parsed in the post. You should copy the data in notepad  and edit double quote again.

This Post Has 4 Comments

  1. suresh

    How can i comment sql-mode in my.cnf file, where can i find it? i’m using godaddy linux shared hosting.

    1. Kailash

      You cannot manage this settings on shared hosting. You need root access of the server to update this.

      – Kailash

  2. marc

    How do i change in filezila ?

Leave a Reply