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!

/etc/my.cfg

Discussion in 'General Discussion' started by bjarne, Feb 9, 2003.

  1. bjarne

    bjarne Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    316
    I was looking on the /etc/my.cfg config file for mysql, and all it have is :

    [mysqld]
    set-variable = max_connections=500

    I think it is a litle bit minimal ? Wold not this make it easy to take down a server easy with som stupid scripting?

    I am thinking of moving one of the config files that is included with mysql over, but I don't realy know wich would be best.

    Anyone worked with this?
     
  2. Danks

    Danks Active Member

    Joined:
    Oct 10, 2001
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    303
    i use the following for all the cpanel servers. WHM will overwrite it so I generally chattr +i /etc/my.cnf

    [client]
    port = 3306

    [mysqld]
    port = 3306
    #socket = /var/tmp/mysql.sock
    skip-locking
    set-variable = key_buffer=16M
    set-variable = max_allowed_packet=1M
    set-variable = table_cache=64
    set-variable = sort_buffer=512K
    set-variable = net_buffer_length=8K
    set-variable = myisam_sort_buffer_size=8M
    set-variable = max_connections = 500
    set-variable = max_user_connections = 45


    [mysqldump]
    quick
    set-variable = max_allowed_packet=16M

    [mysql]
    no-auto-rehash
    # Remove the next comment character if you are not familiar with SQL
    #safe-updates

    [isamchk]
    set-variable = key_buffer=20M
    set-variable = sort_buffer=20M
    set-variable = read_buffer=2M
    set-variable = write_buffer=2M

    [myisamchk]
    set-variable = key_buffer=20M
    set-variable = sort_buffer=20M
    set-variable = read_buffer=2M
    set-variable = write_buffer=2M

    [mysqlhotcopy]
    interactive-timeout
     

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