Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2007
    Posts
    28

    Default my.cnf

    Hi Guys,

    I have not been in the circle for some time and am looking to see if anyone has a nice detailed my.cnf they wouldn't mind sharing.

    This would be used for a shared server, so anything you guys have been using as of late that leaves a good amount of resources per account while not killing the server would be greatly appreciated.

    MySQL v5.1.X

    Thanks!

  2. #2
    Member
    Join Date
    May 2008
    Posts
    1,203

    Default

    Kindly refer to below mentioned URL which might helps you to solve your issue:

    A real production my.cnf file for MySQL Server

  3. #3
    Member
    Join Date
    Aug 2006
    Posts
    22

    Default

    Hello,

    This should give you an idea how my.cnf file should be.
    Copy paste and edit accordingly
    Quote:


    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    skip-locking
    #skip-networking
    safe-show-database
    query_cache_limit=1M
    query_cache_size=64M ## 32MB for every 1GB of RAM
    query_cache_type=1
    max_user_connections=200
    max_connections=500
    interactive_timeout=10
    wait_timeout=20
    connect_timeout=20
    thread_cache_size=128
    key_buffer=128M ## 64MB for every 1GB of RAM
    join_buffer=1M
    max_connect_errors=20
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=2M ## 1MB for every 1GB of RAM
    read_buffer_size=2M ## 1MB for every 1GB of RAM
    read_rnd_buffer_size=2M ## 1MB for every 1GB of RAM
    thread_concurrency=2 ## Number of CPUs x 2
    myisam_sort_buffer_size=64M
    server-id=1
    log_slow_queries=/var/log/mysql-slow-queries.log
    long_query_time=2
    collation-server=latin1_general_ci
    old-passwords
    [mysql.server]
    user=mysql
    basedir=/var/lib
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192
    [mysqldump]
    quick
    max_allowed_packet=16M
    [mysql]
    no-auto-rehash
    #safe-updates
    [isamchk]
    key_buffer=32M
    sort_buffer=32M
    read_buffer=16M
    write_buffer=16M
    [myisamchk]
    key_buffer=32M
    sort_buffer=32M
    read_buffer=16M
    write_buffer=16M
    [mysqlhotcopy]
    interactive-timeout


    PS. This is the general setup. Should work with most of the server setup.

  4. #4
    Member
    Join Date
    Jun 2008
    Location
    Indiana, USA
    Posts
    105

    Default

    It really depends on what type of sites are on the server and how heavy they are. Some servers we've optimized differently than others for performance just due to the type of work the clients are putting on MySQL.

    It can also vary greatly by the available system ram as I wouldn't apply an optimization designed for a server with 12GB RAM to a server with only 1~4GB Ram.
    Michael Denney
    MDDHosting LLC
    http://www.mddhosting.com/

  5. #5
    Member
    Join Date
    Nov 2008
    Location
    United states
    Posts
    20

    Default

    You can use my.cnf file as mentioned by Vinu007, however you should insert your own parameters according to your server resources.
    http://Hostwaresupport.com
    24x7 Technical Support | Server management | Server security

Similar Threads & Tags
Similar threads

  1. .my.cnf
    By viptexting in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-09-2007, 08:43 PM
  2. /etc/my.cnf has no effect?
    By Gavster in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-04-2005, 01:05 PM
  3. my.cnf question
    By cyanide in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-24-2005, 01:54 PM
  4. my.cnf
    By Nico in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-24-2003, 05:05 PM
  5. my.cnf
    By tsook in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-21-2003, 12:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube