Score:0

CPanel: What's overwriting my MySQL config settings?

cn flag

I have a weird problem whereby every few weeks, changes I've made to MySQL config are being reset to their defaults.

I'm on Centos 7.9 and CPanel 98.0.9.

I'm making my changes via PHPMyAdmin while logged in as root. Example:

sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Eventually this gets reverted to include something my CMS doesn't like, namely the STRICT_TRANS_TABLES property.

I spoke to support, who suggested I write the change to /etc/my.cnf instead, which I've now done. But I don't know if there's other places I should write this override so it doesn't get lost again.

I'm no server guy; does anyone know what might be doing this? Where would I go sniffing on the server to hopefully find out?

Thanks very much in advance.

user9540234 avatar
cn flag
How utterly ridiculous that this is closed, because my host (like zillions of hosts) uses control panel software. Presumably over on Stack Overflow questions on React should not be allowed because they extend and modify base JavaScript behaviour and questions.
jm flag
I'm not in a position to vote on closing. This might have been a better fit on Unix&Linux.
Score:0
jm flag

Changes made to the running daemon through the command line are transient and will not survive a restart. You received correct advice to edit /etc/my.cnf, or better put your changes in /etc/my.cnf.d/custom.cnf.

user9540234 avatar
cn flag
Thank you. Then what's the point of ever setting config variables via PHPMyAdmin if they're going to be lost once MySQL is restarted?
jm flag
@user9540234 Useful for checking out configurations before setting the permanently. Rarely, it might be necessary for a one-off query. `PHPMyAdmin` is a useful end-user tool. Not so much for administration.
user9540234 avatar
cn flag
Thanks, appreciated.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.