Skip to content

Administrator Tips icon

How to Turn Off MySQL Strict Mode

In this tutorial we look at how to turn off MySQL Strict Mode. By default, MySQL5 is enabled with strict_mode ON.

Mambo currently does not fully support MySQL5.x in strict_mode (this is on the roadmap and will be dealt with when we move to database portability so Mambo will run on other database servers, not just MySQL).

So, for now, strict_mode needs to be turned off.
This can be done in two ways…

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"

Or, you can run an SQL query within your database management tool, such as phpMyAdmin:

SET @@global.sql_mode= '';
Bookmark This:
  • bodytext
  • Technorati
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Reddit

Whether I am developing Mambo or working on tutorials I am fuelled by coffee. Caffeine keeps me going so if you like the work I am doing please click on the cup to buy me a coffee today. Just $10 covers the cost of getting my caramel macchiato ;)

If you enjoyed this article make sure you subscribe to my RSS feed!

Leave a Reply

This is a gravatar-friendly site, enter your email address to use your gravatar.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.