How to turn on/off Mysql strict mode in the Windows server?

By default in the windows server, the strict mode will be enabled on MySQL. Please refer to the following steps to disable strict mode.

  1. Login to your windows server.

  2. You will need to find my.ini to disable strict mode in MySQL.  Go to C:\ProgramData\MySQL\MySQL Server 5.7



  3. In Windows OS, the ProgramData folder is hidden. To show hidden folder, you can tick on "View" from Menu Bar -> Select hidden items.

  4. You can find the my.ini file from "C:\ProgramData\MySQL\MySQL Server 5.7\my.ini

  5. Open my.ini file with Notepad/Notepad++ and find the following line.

    sql-mode = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"


  6. You need to set sql-mode to Blank and save the file.

    sql-mode = ""


  7. Restart the MySql service from service. Please refer to Restart > MySQL in Windows or Linux system. 

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

Fix - Collection Max error, Cannot Connect to Server

Problem Statement Recently one of our customers was unable to connect to Collection Max and...

How to generate MySQL (backup) dump from the command line in Windows VPS?

This article will assist you how to generate MySQL (backup) dump from the Command line in the...

How to Allow Remote Connection to MySQL Server in Windows?

This article will assist you to enable remote access to MySQL server through Windows command...

How to connect MySQL using PHP?

You can connect your MySQL with PHP using the below methods. Method 1 - PHP extension(mysqli)...

Fix :: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found

Error Message ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no...