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!

varchar(10)

Discussion in 'Database Discussion' started by canou83, Mar 14, 2017.

  1. canou83

    canou83 Well-Known Member

    Joined:
    Jul 20, 2016
    Messages:
    77
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    France
    cPanel Access Level:
    Website Owner
    Hi, for a synchronization application between 2 sites / databases we need to insert more than 10 characters. Out of the classical operation of the base inserts the first 10 characters.

    MySQL :: MySQL 5.7 Reference Manual :: 6.1.8 Server SQL Modes indique qu'il faut modifier le fichier de config de mysql, But every time you restart mysql it gets back up. We need this value to change.

    We do not know where the server takes this value or how to change it permanently.


    Thank you for your help.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,704
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can add a line like this to your /etc/my.cnf file and then restart the MySQL service:

    Code:
    sql_mode="TRADITIONAL"
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. canou83

    canou83 Well-Known Member

    Joined:
    Jul 20, 2016
    Messages:
    77
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    France
    cPanel Access Level:
    Website Owner
    Hi and thank you for your reply. If I add that, it will remove the limit of 10 carcatères? And especially make it final even after a server restart?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,704
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. canou83

    canou83 Well-Known Member

    Joined:
    Jul 20, 2016
    Messages:
    77
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    France
    cPanel Access Level:
    Website Owner
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,704
    Likes Received:
    1,883
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Thank you for explaining the issue further. You may also want to verify that /usr/my.cnf does not exist on the system, as it will overwrite your /etc/my.cnf file settings. If it does exist, try disabling this file and restarting MySQL:

    Code:
    mv /usr/my.cnf /usr/my.cnf.backup1
    /scripts/restartsrv_mysql
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. canou83

    canou83 Well-Known Member

    Joined:
    Jul 20, 2016
    Messages:
    77
    Likes Received:
    7
    Trophy Points:
    8
    Location:
    France
    cPanel Access Level:
    Website Owner
    Hello. We're trying. It looks to be good. Thanks for your advices. We will return to you if need be.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.

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