Skip to main content

WHM Mysql Config not Applying to MySQL [SOLVED]

Comments

1 comment

  • Bill S

    Good grief, that was pretty much a nightmare, been all day at it. For anyone coming to this post looking for a solution that matches the environment mentioned above, here it is. I hope you came here first, most of what you read in general searches  are possibly outdated and incorrect.
    You will read that there are four locations from which mysql gets configs:


    /etc/my.cnf

    /etc/mysql/my.cnf

    /usr/etc/my.cnf

    ~/.my.cnf 

    What I never found in any documentation or post is that there is a fifth, and it's entirely possible this is a WHM or PhpMyadmin thing, I don't know (and frankly don't care at this point.)

    /var/lib/mysql/mysqld-auto.cnf

    This is a JSON file, so be careful. Open it, look for mysql_dynamic_variables -> sql_mode -> Value . . . . there you will find the sql mode values that load and probably overwrite my.cnf.

    systemctl restart mysqld and you're good to go.

    Disclaimer: I'm always suspicious of .json files, they are usually generated by another program. It's entirely possible some action may overwrite the changes. Enough for today though, I'll monitor it and see.

     

    0

Please sign in to leave a comment.