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:

[root@srv012 ~]# 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
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

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...

Domain names are not showing in WHM

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

How to Start/Stop or Restart Apache server

Apache is the HTTP server that is freely available over the internet. It is a kind of software or...

How to install Attracta SEO Tools plugin

RequirementscPanel/WHM needs to be installed on your server. Step 1: SSH into your server and go...

How to Install CpCleaner in cPanel through SSH?

Installation Run the following shell commands as root via SSH: wget -O cpc-1.0.3.tar...