The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mysql my.cnf limits

Discussion in 'General Discussion' started by bsasninja, Jun 1, 2007.

  1. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    I´m running mysql 4.1.21 and have this in my /etc/my.conf

    set-variable = max_connections=300
    set-variable = max_user_connections=100
    set-variable = connect_timeout=10
    set-variable = wait_timeout=10

    I want to add more limits to avoid excesive usage of mysql, I read that there are two commands

    max_connections_per_user
    max_connections_per_ip

    which value should i set to them ?

    Thanks
     
  2. s3bhost.net

    s3bhost.net Member

    Joined:
    May 29, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    open ssh and type :

    Code:
    pico /etc/my.cnf
    remove all and add
    Code:
    [mysqld]
    max_connections = 400
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 2M
    table_cache = 1024
    thread_cache_size = 286
    interactive_timeout = 25
    wait_timeout = 1000
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    tmp_table_size = 16M
    skip-innodb
    [mysqld_safe]
    open_files_limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [myisamchk]
    key_buffer = 32M
    sort_buffer = 32M
    read_buffer = 16M
    write_buffer = 16M
    
    [mysqlhotcopy]
    interactive-timeout
    safe-show-database
    set-variable=local-infile=0
    restart mysql :

    Code:
    /etc/init.d/mysql restart
     
  3. Un Area

    Un Area Well-Known Member

    Joined:
    Nov 16, 2006
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    yeah but no values for

    max_connections_per_user
    max_connections_per_ip
     
  4. bsasninja

    bsasninja Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    528
    Likes Received:
    0
    Trophy Points:
    16
    Anyone is using this settings at /etc/my.cnf ?

    max_connections_per_user =
    max_connections_per_ip =

    which values should I insert there? This settings works with mysql 4.1.21 ?

    Thanks
     
Loading...

Share This Page