Здравствуйте. А не подскажите как установить переменную?
root@vesta:~# sudo mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 8.0.22 MySQL Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select @@GLOBAL.SQL_MODE;
+-----------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.SQL_MODE |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> SET @@global.sql_mode = '';
Query OK, 0 rows affected (0.00 sec)
mysql> select @@GLOBAL.SQL_MODE;
+-------------------+
| @@GLOBAL.SQL_MODE |
+-------------------+
| |
+-------------------+
1 row in set (0.00 sec)
После перегрузки сервера, значение не сохраняется
root@vesta:~# sudo service mysql restart
root@vesta:~# sudo mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.22 MySQL Community Server - GPL
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select @@GLOBAL.SQL_MODE;
+-----------------------------------------------------------------------------------------------------------------------+
| @@GLOBAL.SQL_MODE |
+-----------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Спасибо.