### MySQL Configuration file. This is a base configuration file containing the most frequently used ### settings with reasonably defined default values for configuring and ### tuning MySQL. Note that these settings can likely be further tuned ### in order to get optimum performance from MySQL based upon the database ### configuration and hardware platform. ### # The following options will be passed to all MySQL clients [client] port = 3306 socket = /var/lib/mysql/mysql.sock # The MySQL server [mysqld] #Basic Settings # ------------- port = 3306 socket = /var/lib/mysql/mysql.sock tmpdir=/tmp default-storage-engine = InnoDB #default-table-type = InnoDB skip-external-locking # Added to prevent DNS lookups from causing performance issues skip-name-resolve #bind-address= 192.168.86.100 # Connection Settings # ------------- max_connections = 2048 max_connect_errors = 10 connect_time=10 wait_timeout=300 interactive_timeout=1800 # Misc Settings # ------------- table_cache=2048 thread_cache_size = 250 thread_stack = 256K thread_concurrency = 8 back_log=50 open-files-limit = 32768 open-files = 32768 sql-mode="NO_UNSIGNED_SUBTRACTION" # Set Character Settings # ------------- #default-character-set=utf8 character_set_server=utf8 skip-character-set-client-handshake # Error Logs # ----------------------- log-error = /var/log/mysql/mysql-server-error.log # General Log # ----------------------- #log = /var/lib/mysql/general.log # Slow Query Log Settings # ----------------------- slow_query_log slow_query_log_file=/var/log/mysql/mysql-slow.log #log-slow-queries=/var/lib/mysql/mysql-slow.log long_query_time=1 #log-queries-not-using-indexes log-warnings # Global, Non Engine-Specific Buffers # ----------------------------------- max_allowed_packet = 16M max_tmp_tables = 128 tmp_table_size = 128M max_heap_table_size = 32M # Query Cache # ----------------------------------- query_cache_size = 256M query_cache_type = 2 query_cache_limit = 1M query_prealloc_size = 8192 query_alloc_block_size = 8192 query_cache_min_res_unit = 1024 # Per-Thread Buffers # ------------------ sort_buffer_size = 128M read_buffer_size = 4M read_rnd_buffer_size = 4M join_buffer_size = 8M bulk_insert_buffer_size = 8M # MyISAM # ------ key_buffer_siz = 400M myisam_sort_buffer_size=64M # InnoDB # ------ innodb_file_per_table innodb_data_home_dir = /var/lib/mysql innodb_log_group_home_dir = /var/lib/mysql innodb_data_file_path = ibdata1:10M:autoextend #innodb_log_arch_dir = /var/lib/mysql innodb_log_files_in_group = 2 innodb_log_file_size = 256M innodb_log_buffer_size = 16M innodb_buffer_pool_size = 301M innodb_buffer_pool_instances = 8 innodb_additional_mem_pool_size = 32M innodb_flush_log_at_trx_commit = 2 innodb_lock_wait_timeout = 40 innodb_thread_concurrency = 0 innodb_read_io_threads = 8 innodb_write_io_threads = 8 innodb_flush_method = O_DIRECT #innodb_autoinc_lock_mode = 2 #innodb_open_files=1024 # Replication Settings # ----------------------------- server-id = 1 binlog_format=mixed log-bin=/var/local/mysql/binlogs/mysql-bin log-bin-index=/var/local/mysql/binlogs/mysql-bin.index relay-log=/var/local/mysql/binlogs/mysqld-relay-bin relay-log-index=/var/local/mysql/binlogs/mysqld-relay-bin.index #relay-log-space-limit = 4G expire_logs_days=2 log-slave-updates #sync_binlog=1 #skip-slave-start [mysqldump] max_allowed_packet=50M add-drop-table extended-insert quote-names quick [mysql.server] user=mysql no-auto-rehash [mysqld_safe] pid-file=/var/run/mysqld/mysqld.pid open-files-limit=65535