sql_mode=""
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
so reversing the sql_mode in the cnf back to NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION would seem to exactly follow the advice I have been reading elsewhereSince MariaDB 10.2.4, SQL_MODE is by default set to NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO.
In earlier versions of MariaDB 10.2, and since MariaDB 10.1.7, SQL_MODE is by default set to NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER.
For earlier versions of MariaDB 10.1, and MariaDB 10.0 and before, no default is set.
I thought that was exactly what we had been discussingI am still interested in answer from cPanel staff, and regarding 10.2.x and not 10.1.x
Prior to cPanel & WHM version 58, installing or updating to MySQL version 5.6 lead to the creation of a /usr/my.cnf file with the sql_mode directive set to "strict mode". Internal case CPANEL-6030 was implemented in cPanel & WHM version 58 to prevent this from happening on new installations, however the file may still exist on older systems. Any systems still using a /usr/my.cnf file should make note of any entries in this file, remove it, and then add/merge those entries into the /etc/my.cnf file.Thanks. Isn't it supposed to be done in /usr/my.cnf?
Upgrading to MariaDB version 10.2 will automatically enable strict mode and remove any existing sql_mode entries in the /etc/my.cnf. This is by-design due how MariaDB implements the change. After the initial upgrade to MariaDB 10.2, you'd need to manually add the following value under the [mysqld] section in the /etc/my.cnf file if you want to revert this change:If so, is it going to stick while upgrading minor MariaDB 10.2.x versions?
sql_mode=NO_ENGINE_SUBSTITUTION
Hello @dr_lucas,Thanks, @cPanelMichael
Could you please confirm that strict mode won't get re-enabled after getting it disabled in the way you described (at the end of the initial 10.2 upgrade), when later upgrading minor 10.2.x versions and/or when upgrading cPanel/WHM versions?
What do you have now in /etc/my.cnfHello guys, i got a a big dillema :D is it same to set
sql_mode=NO_ENGINE_SUBSTITUTION
With accounts on the server ? The think is i got around 300 websites and some of them some functions not working since i update to MariaDB 10.3 and i`m a bit afraid not to make sompting with the databases on the server by setting the sql_mode
thank you
Hello,What do you have now in /etc/my.cnf
Do you have any sql_mode= ?
If some sites not working you need to set sql_mode that is why some sites not working most likely. All you do is add
under the
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION
Restart MySQL
And see if problems persist .
You can always remove this line if needed. But most likely your problems will be solved after adding this line.