SOLVED [CPANEL-25603] Update breaks MySQL configuration file when no quotes are added to 'sql_mode' value

Oct 26, 2012
7
0
1
cPanel Access Level
Root Administrator
I know this thread is a little old, but I had the same problem this morning.

I followed Michael's advice to check the my.conf file and found the second last line filled out with doublequotes eg """"""""""" - maybe a couple of hundred of them.

I edited to remove, restarted the service and all was well, but why would the cpanel update add all these doublequotes to the config file?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello @newbiesysadmin,

I moved this post to a separate thread since it appears to relate to a separate issue.

Can you confirm if your /etc/my.cnf file included the following line prior to the update?

Code:
sql_mode=
If so, this is a known issue that occurs when quotes are are missing from the 'sql_mode' value in the system's /etc/my.cnf file. It's fixed in cPanel & WHM version 80:

Fixed case CPANEL-25603: Ensure keys with null values are correctly handled when rebuilding /etc/my.cnf.

Additionally, there's an open request to backport this case into cPanel & WHM version 78. I'll continue to monitor the case and update this thread with more information as it becomes available.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello @newbiesysadmin,

Yes, the workaround until your system is on a version of cPanel & WHM with the fix is to add quotes to the configuration options with null values in the /etc/my.cnf file. EX:

sql_mode=""
10/14/2019 Moderator Note: Switched to quote format and removed spaces to ensure proper syntax is provided.

Thank you.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
It's fixed in cPanel & WHM version 80:

Fixed case CPANEL-25603: Ensure keys with null values are correctly handled when rebuilding /etc/my.cnf.

Additionally, there's an open request to backport this case into cPanel & WHM version 78. I'll continue to monitor the case and update this thread with more information as it becomes available.
To update, the fix was backported into cPanel & WHM 78 as of version 78.0.23.

Thanks!