Webmin error, sql-mode="" is an unknown variable

2 posts / 0 new
Last post
#1 Sun, 05/05/2019 - 01:26
adamjedgar

Webmin error, sql-mode="" is an unknown variable

I have run into problems trying to reinstall whmcs...once again more errors. My understanding is, the automated script is supposed to sort all of this, however, clearly that is not the case.

I am running debian 9 with php 7.2 and whmcs 7.6.

I have use the Virtualmin script installer to install whmcs, however, it fails to install the database.

I assumed that perhaps strict mode is enabled in mysql, so i ran the query in phpmyadmin SELECT @@mysqsl_mode

It returns... NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

So my understanding from this thread... https://www.virtualmin.com/node/52204 the way to disable strict mode is to add the following to /etc/mysql/mariadb.cnf sql-mode="" or sql-mode=

i also tried sql_mode="" and sql_mode=

Any of the above return the following error in webmin...

The MySQL client program /usr/bin/mysql does not appear to be the correct version. Webmin only supports MySQL versions 3 and above.
The command /usr/bin/mysql -V returned :

/usr/bin/mysql: unknown variable 'sql-mode='
Sun, 05/05/2019 - 02:23
adamjedgar

ok so i think i may have found a way of disabling strict mode without Webmin throwing this error.

etc/mysql/conf.d

added a new file called strict_mode.conf

In that new file i added the following

sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

I then run the following query in phpmyadmin

SHOW VARIABLES LIKE 'sql_mode'

which returns,

sql_mode (without any value)

So my hope is that this has resolved my problem. Perhaps someone could explain why it is that i cannot simply add the variable sql_mode= into mariadb.conf without Webmin throwing and error?

Is it because in Webmin, you cannot have a variable with an empty value?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked