# # Generated by Chef for <%= node['hostname'] %> # Platform: <%= node['platform'] %> # [client] port = <%= node[:mysql][:port] %> socket = <%= node[:mysql][:socket] %> [mysqld_safe] socket = <%= node[:mysql][:socket] %> nice = 0 [mysqld] user = <%= node[:mysql][:user] %> pid-file = <%= node[:mysql][:pid_file] %> socket = <%= node[:mysql][:socket] %> port = <%= node[:mysql][:port] %> basedir = <%= node[:mysql][:basedir] %> datadir = <%= node[:mysql][:datadir] %> tmpdir = /tmp character-set-server = utf8 collation-server = utf8_unicode_ci init_connect = 'SET collation_connection = utf8_unicode_ci' init_connect = 'SET NAMES utf8' default-storage-engine=innodb skip-external-locking skip-name-resolve skip-federated bind-address = <%= node[:mysql][:bind_address] %> # # * Fine Tuning # # This replaces the startup script and checks MyISAM tables if needed # the first time they are touched myisam-recover = BACKUP #thread_concurrency = 10 max_allowed_packet = <%= node[:mysql][:tunable][:max_allowed_packet] %> thread_stack = <%= node[:mysql][:tunable][:thread_stack] %> thread_cache_size = <%= node[:mysql][:tunable][:thread_cache_size] %> key_buffer = <%= node[:mysql][:tunable][:key_buffer] %> max_connections = <%= node[:mysql][:tunable][:max_connections] %> wait_timeout = <%= node[:mysql][:tunable][:wait_timeout] %> net_read_timeout = <%= node[:mysql][:tunable][:net_read_timeout] %> net_write_timeout = <%= node[:mysql][:tunable][:net_write_timeout] %> back_log = <%= node[:mysql][:tunable][:back_log] %> table_cache = <%= node[:mysql][:tunable][:table_cache] %> max_heap_table_size = <%= node[:mysql][:tunable][:max_heap_table_size] %> # # * InnoDB Tuning # innodb_buffer_pool_size = <%= node[:mysql][:tunable][:innodb_buffer_pool_size] %> innodb_additional_mem_pool_size = <%= node[:mysql][:tunable][:innodb_additional_mem_pool_size] %> innodb_flush_log_at_trx_commit = <%= node[:mysql][:tunable][:innodb_flush_log_at_trx_commit] %> innodb_lock_wait_timeout = <%= node[:mysql][:tunable][:innodb_lock_wait_timeout] %> #innodb_log_file_size=250M #innodb_log_buffer_size=8M # # * Query Cache Configuration # # Query Cache query_cache_limit = <%= node[:mysql][:tunable][:query_cache_limit] %> query_cache_size = <%= node[:mysql][:tunable][:query_cache_size] %> query_cache_type = <%= node[:mysql][:tunable][:query_cache_type] %> # # * Slow Query Logging # log_slow_queries = <%= node[:mysql][:tunable][:log_slow_queries] %> long_query_time = <%= node[:mysql][:tunable][:long_query_time] %> log-queries-not-using-indexes # The following can be used as easy to replay backup logs or for replication. # note: if you are setting up a replication slave, see README.Debian about # other settings you may need to change. #server-id = 1 #log_bin = <%= node[:mysql][:logdir] %>/mysql-bin.log expire_logs_days = 10 max_binlog_size = 100M #binlog_do_db = include_database_name #binlog_ignore_db = include_database_name [mysqldump] quick quote-names max_allowed_packet = 32M default-character-set = utf8 [mysql] default-character-set = utf8 [isamchk] key_buffer = 16M <% case node['platform'] -%> <% when "centos", "redhat", "suse", "scientific", "amazon" -%> # We do not include any additional configuration directories for # Redhat based systems. <% else -%> # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # !includedir /etc/mysql/conf.d/ <% end -%>