How To Disable MySQL Strict Mode on cPanel Server
⚡ Steps to Disable MySQL Strict Mode on cPanel Server
🔹 Step 1: Log in as Root
Log in to your cPanel/WHM server via SSH or open the Terminal from WHM.
🔹 Step 2: Edit MySQL Configuration File
Open the /etc/my.cnf file using a text editor:
🔹 Step 3: Locate sql_mode Setting
Search for the line that defines sql_mode.
It usually looks like this:
🔹 Step 4: Remove Strict Mode Values
Delete the strict values (like STRICT_TRANS_TABLES or STRICT_ALL_TABLES) and keep only:
👉 or completely comment out the sql_mode line.
🔹 Step 5: Save the File
In nano, press:
🔹 Step 6: Restart MySQL Service
Restart MySQL to apply changes:
or (depending on your system):
For MariaDB:
✅ At this point, MySQL strict mode is disabled.
You may need to restart applications or websites that rely on the database.
Share
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0
