1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

edit my.cnf

Discussion in 'General Discussion' started by baby names, Jul 29, 2011.

  1. baby names

    baby names New Member

    Joined:
    Feb 18, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I own an unmanaged LINUX VPS with cpanel



    in one websie i'm getting following error

    Invalid query: Got a packet bigger than 'max_allowed_packet' bytes

    Where to edit and how to edit through whm
     
  2. ultimatehosting

    ultimatehosting New Member

    Joined:
    Jul 30, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    You need to edit my.cnf as root and increase the value of max_allowed_packet as per your requirements.
     
  3. cPanelTristan

    cPanelTristan Active Member
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,621
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    The file is at /etc/my.cnf in root SSH, since the full path wasn't noted previously. Upon making any changes to /etc/my.cnf file, please restart MySQL for those changes to take effect.
     
  4. ultimatehosting

    ultimatehosting New Member

    Joined:
    Jul 30, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    Oops I missed that, thanks for stepping in and providing the OP with the complete path.
     
  5. james-r

    james-r New Member

    Joined:
    Dec 28, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello people!

    I see this forum gives some information; however, its seems to be lacking easy steps for a beginner. I have an article on this that shows how to cat, nano, and view through shell the my.cnf settings.

    /http://www.inmotionhosting.com/support/website/general-server-setup/edit-mysql-my-cnf

    The my.cnf may not have the setting in it when you view it through shell.

    Viewing the MySQL variables through shell.
    1. Login to your server via SSH
    1. Type the following command: myasqladmin variables
    You can also view the settings for MySQL in PhpMyAdmin.
    1. Log into your phpMyAdmin
    1. Click the Variables tab at the top right.

    That way you can get the exact MySQL settings available to edit in the my.cnf as well.

    Regards,
    James R


     
  6. linux7802

    linux7802 Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    I would like to recommend you, if you are not sure about correct mysql parameter for your server which will increase the server performance then run the mysqltunner and make the necessary changes in the my.cnf file but make sure that you have taken a backup for the original my.cnf file. The incorrect values in the my.cnf file can cause the major problem to your server performance, so be careful while making changes.
     

Share This Page