Disable MySQL strict mode

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

Disable MySQL strict mode

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

MySQL strict mode can be disabled by server’s root or administrator user hence 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.

Import 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.

If you still face any issue and require any assistance, you may reach to our web hosting community members from our Web Hosting forum.

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