How to set the default value for sql_mode?

If you go to phpmyadmin and run sql query

SELECT @@sql_mode;

Then vivede the default value
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_...

Because his sites down error, but it is possible to shut down a team that is to clear the value.

SET GLOBAL sql_mode = ";

And then everything is in order, BUT from time to time value is returned in the original form, how to do that would for example after you restart the server sql_mode was equal to the void ???
July 4th 19 at 22:57
1 answer
July 4th 19 at 22:59
Solution
In settings --sql-mode=" or in my.cnf

[mysqld] 
...
sql_mode = "
...


in docks it is written.
Please give a more detailed answer if you write to a file my.cnf, how it is necessary, just write the end of the file, and all ?

# some text

[mysqld] 
sql_mode = ""
- vincenza19 commented on July 4th 19 at 23:02
not so, here, more please:
1) go into the console to where you have my.cnf is probably the most suitable:
# sudo cd /etc/mysql

2) make a copy just in case:
# sudo cp my.cnf my.cnf.old

3) open my.cnf
sudo nano my.cnf

There will be something like this:

[mysqld]
cacheux = Cacoal
taksnega = stroked

sql_mode = ""

[mysqldump]
opathie=text

4) save ctr+o and exit Ctrl+x

5) restart mysql
# sudo service mysql restart - royce.Hayes34 commented on July 4th 19 at 23:05
: Got it, thanks, now I will try, though I have to file my.cnf except comments, nothing ) - vincenza19 commented on July 4th 19 at 23:08
Made an entry in the file sql_mode = ""
After reload command is hang-up and then gives an error

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
- vincenza19 commented on July 4th 19 at 23:11
Damn, forgot to add [mysqld] now works after a reboot sql_mode clean, thank you ) - vincenza19 commented on July 4th 19 at 23:14

Find more questions by tags SQLMySQL