J
J
John2016-09-20 15:43:42
MySQL
John, 2016-09-20 15:43:42

How to set default value for sql_mode?

If you go to phpmyadmin and execute a sql query
SELECT @@sql_mode;
Then display the default value
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_...
It causes errors on sites, but you can turn it off with this command, that is, clear the value. And then everything is in order, BUT, from time to time the value returns to its original form, how to make it so that, for example, after restarting the server, sql_mode was equal to emptiness ???
SET GLOBAL sql_mode = '';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Yankovsky, 2016-09-20
Doe

In parameters --sql-mode='' or in my.cnf

[mysqld] 
...
sql_mode = ''
...

it's written in the docs .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question