George Newton George Newton - 1 year ago 136
SQL Question

MySQL: Setting sql_mode permanently

Via the MySQL command line client, I am trying to set the global mysql_mode:


This works for the current session, but after I restart the server, the sql_mode goes back to its default: '', an empty string.

How can I permanently set sql_mode to TRADITIONAL?

If relevant, the MySQL is part of the WAMP package.

Thank you.

Answer Source

Add this to your my.cnf file (or my.ini if you're using windows):


and restart the server

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download