How to find and disable MySQL strict mode?

Hi everyone, I wanted to find this strict mysql mode for whmcs and disable it, but I had no progress. I am so new if I didn’t mention other things. Can someone help me? I am working on WHM / Cpanel

+4
source share
4 answers

To disable (or enable) strict mysql access from cpanel.

1, find "phpmyadmin", click on it in the search field

2, once phpmyadmin is loaded, click on the "variables" tab

3, find the 'sql mode'

then

to enable strict mode on input

STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION

to disable strict mode, enter

NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

script, , , , .

+4

Centos 6.9 MariaDB cpanel, , . :

SSH/ :

# mysql -e "SELECT @@sql_mode;"

+----------------------------------------------------------------------+
| @@sql_mode                                                           |
+----------------------------------------------------------------------+
|STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, |
|NO_ENGINE_SUBSTITUTION                                                |
+----------------------------------------------------------------------+

my.cnf

vim /etc/my.cnf

,

:

sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

:

sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

MySQL

/etc/init.d/mysql restart

, :

# mysql -e "SELECT @@sql_mode;"

+--------------------------------------------+
| @@sql_mode                                 |
+--------------------------------------------+
| NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+--------------------------------------------+

:)

+1

, MySQL, . , . cPanel, , root.

mysql my.cnf, SSH ( root sudo), /etc/my.cnf , :

[]

sql_mode = ", NO_AUTO_CREATE_USER"

mysql. , , .

0

Open the my-default.inifile and remove the parameter STRICT_TRANS_TABLESfrom the sql_mode value.

[Ex: In localhost xampp, the file is in xampp / mysql / my-default.ini]

The default sql_mode value is lower

sql_mode=STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

change it to

 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

This will disable strict mode in MYSQL.

-1
source

All Articles