自己写一个my.cnf,可把mysql自带的my-example.cnf改名,放到C盘根目录下

解决方案 »

  1.   

    在my.ini(my.cnf)中添加如下语句:
    max_connections=256
    max_user_connections=256
    其中256为你想要的连接最大数。
    一般在100就可以的。
      

  2.   

    # Example mysql config file for small systems.
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-locking
    #设置最大连接数
    set-variable = max_connections=100
    set-variable = max_user_connections=0
    #
    set-variable = key_buffer=16K
    set-variable = max_allowed_packet=1M
    set-variable = thread_stack=64K
    set-variable = table_cache=4
    set-variable = sort_buffer=64K
    set-variable = net_buffer_length=2K
    server-id = 1
    # Example mysql config file for medium systems.
    [mysqld]
    port = 3306
    socket = /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
    log-bin
    server-id = 1# Example mysql config file for large systems.
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-locking
    set-variable = key_buffer=256M
    set-variable = max_allowed_packet=1M
    set-variable = table_cache=256
    set-variable = sort_buffer=1M
    set-variable = record_buffer=1M
    set-variable = myisam_sort_buffer_size=64M
    set-variable = thread_cache=8
    # Try number of CPU's*2 for thread_concurrency
    set-variable = thread_concurrency=8
    log-bin
    server-id = 1# Example mysql config file for very large systems.
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock
    skip-locking
    set-variable = key_buffer=384M
    set-variable = max_allowed_packet=1M
    set-variable = table_cache=512
    set-variable = sort_buffer=2M
    set-variable = record_buffer=2M
    set-variable = thread_cache=8
    # Try number of CPU's*2 for thread_concurrency
    set-variable = thread_concurrency=8
    set-variable = myisam_sort_buffer_size=64M
    log-bin
    server-id = 1