Steps to enable MySQL strict mode in Windows server

kumkumsharma

Administrator
Staff member
You will find that MySQL strict mode is by default enabled, but if you want to enable/disable it according to your requirement then you can follow below steps:
  • Login to your Windows VPS server.
  • Now you have to find my.ini find to modify strict mode.
Code:
Go to C:\ProgramData\MySQL\MySQL Server 5.7
  • If you are not able to find ProgramData folder then it means this folder is hiddenso you have to tick on “View” tab in menu bar and then check the box “Hidden items”.
  • Now you will fins my.ini file at "C:\ProgramData\MySQL\MySQL Server 5.7\my.ini location.
  • You can choose your desired editor and edit the file my.ini and search for below line.
Code:
sql-mode = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  • You have to set the sql-mode empty liek below to enable it.
Code:
sql-mode = ""
  • Now to reflect changes restart MySQL service in Windows.
 
Top