# /etc/mysql/my.cnf: The global mysql configuration file. # $Header: /var/cvsroot/gentoo-x86/dev-db/mariadb/files/my.cnf-5.1,v 1.2 2010/03/24 18:27:39 robbat2 Exp $ # The following options will be passed to all MySQL clients [client] port = 3306 [mysqld] character-set-server = utf8 user = mysql port = 3306 bind-address = 127.0.0.1 skip-external-locking table_open_cache = 4096 table_definition_cache = 4K skip_name_resolve=1 net_buffer_length = 24K low_priority_updates=1 concurrent_insert=ALWAYS back_log = 100 #for reset root pass #skip-grant-tables # gneral log #general_log=1 #general_log_file=/var/log/mysql_general.log thread_handling=pool-of-threads thread_pool_idle_timeout=600 thread_pool_oversubscribe=6 thread_cache_size=40 query_cache_size = 2G query_cache_limit = 3M query_cache_strip_comments = 1 query_cache_type = 1 query_cache_min_res_unit = 4096 query_cache_wlock_invalidate = 0 query_prealloc_size = 65k query_alloc_block_size = 128k aria_pagecache_buffer_size=5G aria_repair_threads=16 aria_sort_buffer_size=16M myisam_sort_buffer_size=16M sort_buffer_size=32M # Size limit for the whole join join_buffer_space_limit = 300M # Limit for each individual table #join_buffer_size = 100M join_buffer_size = 8M max_connections = 100 wait_timeout = 3000 tmp_table_size = 8G max_heap_table_size = 8G key_buffer_size = 16G #(RAM*0.25) key_cache_segments = 32 myisam_use_mmap = ON join_cache_level = 8 read_buffer_size = 256K read_rnd_buffer_size = 4M bulk_insert_buffer_size = 64M max_sort_length = 512 myisam_max_sort_file_size = 128M myisam_repair_threads = 2 myisam_recover innodb_log_buffer_size = 32M innodb_log_file_size = 4G innodb_log_files_in_group = 2 innodb_flush_log_at_trx_commit = 2 innodb_thread_concurrency = 64 innodb_buffer_pool_size = 32G innodb_buffer_pool_instances=32 innodb_data_home_dir = /var/db/mysqldata innodb_log_group_home_dir=/var/db/mysqllogs innodb_file_per_table=1 innodb_stats_persistent=0 innodb_data_file_path = ibdata1:1024M:autoextend innodb_autoextend_increment=32 innodb_flush_method=O_DIRECT max_allowed_packet=256M slow_query_log=ON long_query_time = 4 #log-queries-not-using-indexes slow_query_log_file=/tmp/slow.log skip-name-resolve # if db is broken #innodb_force_recovery=6 #innodb_force_load_corrupted=1 # zfs skip-innodb_doublewrite [mysqldump] quick max_allowed_packet = 64M [mysql] # uncomment the next directive if you are not familiar with SQL #safe-updates [isamchk] key_buffer = 20M sort_buffer = 20M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 20M sort_buffer = 20M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout