How to Turn Off MySQL Strict Mode

I’m helping my boss to set-up a Mambo CMS. When I was trying to insert a post, it was giving an error message. Later I found that I need to turn-off the strict mode of MySQL to avoid this error.

This can be done very easily. Run the following query

SET @@global.sql_mode= '';


Or else you can,

Open your “my.ini” file within the MySQL installation directory, and look for the text “sql-mode“.
Find:

# Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Replace with:

# Set the SQL mode to strict sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Reblog this post [with Zemanta]
Did you enjoy this article?
Signup today and receive free updates straight in your inbox. We will never share or sell your email address.

Leave a Reply