Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix `unknown variable 'sql-mode=ANSI'`?

Tags:

mysql

Using MySQL 5.5.27, in my.cnf I have:

[mysql]
sql_mode=ANSI

Upon starting the mysql console I get:

unknown variable 'sql-mode=TRADITIONAL'

The MySQL doc Server SQL Modes shows that option, so why does it not work?

(If it helps, I am on OSX Lion)

Also, here is a pastebin showing the things another person has tried, with no solution.

like image 352
Zabba Avatar asked May 10 '13 04:05

Zabba


1 Answers

sql-mode should be in the [mysqld] section, not in the [mysql] section. If you move sql-mode=ANSI to the [mysqld] section, it should work.

like image 117
drew Avatar answered Sep 19 '22 08:09

drew