Skip to content

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, Joomla! and many other web applications currently do not fully support MySQL5.x in strict_mode. So, until they do, 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= '';

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

Topic: Site Management
Tagged as: database management tool, MySQL, sql query, strict mode, web applications

Share on FriendFeed

{ 1 comment… read it below or jump to the comment form to share your opinion }

  1. 1 Baltic Nordic February 26th, 2010 at 4:06 am

    Thanks Lynne

    Struggling to overcome this problem, I came to your solution. Thanks, it helped me....

    balnor

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Any comments that look like spam will be treated as spam - this includes SEO titles and use of spurious keywords.

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