How to Disable MySQL Strict Mode?

Note: In order to make the following changes, you will need full root permissions for the server you are on. If you do not have full root permissions, you will need to contact your web host or sysadmin to request this to be done.

Using your favorite SSH Client or via the built-in Terminal feature of WHM. In this case, we will be using the Terminal Feature found within WHM v72+. If you are using an older version of WHM/cPanel, the steps are the same via your SSH client.

To get started, simply navigate to the Terminal option found under the Server Configuration heading in WHM.

Once in the terminal session, open the MySQL configuration file up with your favorite text editor (nano, vi, etc.). For cPanel servers, the location of the MySQL configuration file is /etc/my.cnf and we will edit it by doing the following:

[[email protected] ~]# nano -w /etc/my.cnf

Edit the sql_mode value within this file and remove any value it has. The result should be as follows:


Restart the MySQL service. Since we are already logged into WHM, simply choose to restart the MySQL service from the left-hand column.

  • mysql, cpanel, whm, strict mode, sql, mariadb
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix defaultwebpage.cgi on a webserver

Running the following commands solves the above problem:   /scripts/updateuserdomains...

How to fix IP Missing issue on cPanel/WHM

We are here to help you with solving the problem of Missing IP Server in list accounts. The...

Install Let's Encrypt SSL in cPanel/WHM

Let's Encrypt, a valid, open-source license that offers free SSL for your domains. The Let's...

Fix Email Issue on a server using the MSFE

To solve the problem of not sending/receiving email on a server using the MSFE / Mailscanner...

Domain names are not showing in WHM

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...