Knowledgebase: Dedicated Server Guide
How to turn off MySQL strict mode to fix Null value error
Posted by PremiumReseller.com on 30 August 2010 12:57 AM

You receive error "My SQL Error 1048 column description cannot be null" when restoring database or running sql query to insert null value.

The error is caused by MySQL running in strict mode. To disable strict mode, please follow instruction below.

Open the "my.ini" file within the MySQL installation directory and look for strict mode setting.

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

Replace the setting with:

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

(178 vote(s))
This article was helpful
This article was not helpful