# /etc/mysql/my.cnf: The global mysql configuration file. # $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.14-r1,v 1.2 2004/07/18 02:47:43 dragonheart Exp $ # # This file can be simultaneously placed in three places: # 1. /etc/mysql/my.cnf to set global options. # 2. /var/lib/mysql/my.cnf to set server-specific options. # 3. ~/.my.cnf to set user-specific options. # # One can use all long options that the program supports. # Run the program with --help to get a list of them. # # The following values assume you have at least 32M RAM! [client] #password = my_password port = 3306 socket = /var/run/mysqld/mysqld.sock [safe_mysqld] err-log = /var/log/mysql/mysql.err #open_files_limit = 8192 [mysqld] user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock log-error = /var/log/mysql/mysqld.err basedir = /usr datadir = /var/lib/mysql tmpdir = /dev/shm/mysql-tmp language = /usr/share/mysql/english skip-locking set-variable = thread_stack=128K # keep secure by default! #bind-address = 127.0.0.1 port = 3306 # this can make it even more secure: #skip-networking #intense logging for debug purposes #log = /var/log/mysql/query-log.sql # number of CPU's*2 thread_concurrency = 4 #Testing low priority for all updates that lock tables # low-priority-updates=1 set-variable = join_buffer_size=2M set-variable = read_buffer_size=2M set-variable = sort_buffer_size=2M set-variable = max_allowed_packet=16M set-variable = thread_stack=128K set-variable = max_connections=200 set-variable = max_connect_errors=9999999 set-variable = wait_timeout=120 set-variable = interactive_timeout=600 set-variable = table_cache=2500 ## set-variable = query_cache_size=0M set-variable = query_cache_limit=0MB set-variable = thread_cache_size=100 set-variable = max_tmp_tables=15 set-variable = max_heap_table_size=64M set-variable = key_buffer_size=120M set-variable = read_rnd_buffer_size=5M set-variable = myisam_sort_buffer_size=2M set-variable = net_write_timeout=300 default_table_type = INNODB # Here you can see queries with especially long duration #log-long-format log-slow-queries = /var/log/mysql/mysql-slow.log set-variable = log_queries_not_using_indexes=1 # Some more tweaks that we got from http://www.databasejournal.com/features/mysql/article.php/3367871 #read_rnd_buffer_size=4M tmp_table_size=100M #sort_buffer=9M ##################### #INNODB Settings #################### innodb_data_home_dir= innodb_data_file_path= /dev/sda6:50Graw; innodb_buffer_pool_size=2G innodb_additional_mem_pool_size=10M innodb_log_file_size=1G innodb_log_buffer_size=50M innodb_flush_log_at_trx_commit=0 innodb_thread_concurrency=0 innodb_flush_method=O_DIRECT innodb_status_file=1 innodb_thread_concurrency=8 memlock #replication settings server-id=2 master-connect-retry = 60 replicate-same-server-id = 0 log-bin relay_log_purge=TRUE log-slave-updates=TRUE auto_increment_increment=2 auto_increment_offset=2 replicate-ignore-table=drupal.temp_search_sids replicate-ignore-table=drupal.temp_search_results replicate-do-db=drupal read-only [mysqldump] quick [mysql] #no-auto-rehash # faster start of mysql but no tab completition [isamchk] set-variable = key_buffer=16M