Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Global sql_mode keeps changing

Discussion in 'Database Discussion' started by polle, Mar 30, 2019.

  1. polle

    polle Registered

    Joined:
    Feb 12, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I have to run this query every week, the server keeps changing by itself.

    Code:
    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
    
    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'STRICT_TRANS_TABLES',''));
    I see this when I go to some of that sites and are not working. So noticing this because my sites are down it is not good and of course having the sites down for who knows how many hours or days until I load specific pages, is worse.

    What can the problem be?

    Thank you.
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    506
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @polle

    To have this last past a restart to MySQL you should add this into /etc/my.cnf, for example:

    Code:
    [mysqld]
    sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. polle

    polle Registered

    Joined:
    Feb 12, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Can you please share exactly what I need to add to /etc/my.cnf to have both things permanent?

    Thank you.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice