[mysqld] # basic settings # datadir = /var/lib/mysql pid_file = /var/lib/mysql/mysql.pid socket = /var/lib/mysql/mysql.sock sql_mode = "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" performance_schema = ON # Engine default-storage-engine = InnoDB general_log_file = /var/log/mysqld/mysql.log general_log = 0 log_error = /var/log/mysqld/mysql-error.log log_queries_not_using_indexes = 0 slow_query_log = 1 slow_query_log_file = /var/log/mysqld/mysql-slow.log long_query_time = 15 log_warnings = 0 # Safety max-connect-errors = 1000000 max_allowed_packet = 256M innodb = FORCE innodb-strict-mode = 1 # connection Settings # interactive_timeout = 180 wait_timeout = 180 connect_timeout = 60 max_connections = 1024 max_user_connections = 256 # Caches Settings table_open_cache = 2048 table_definition_cache = 1024 table_open_cache_instances = 32 query_cache_size = 0 query_cache_type = 0 query_cache_limit = 256M thread_cache_size = 50 open-files-limit = 65535 table-definition-cache = 1024 table-open-cache = 2048 # Buffers Settings tmp_table_size = 128M key_buffer_size = 64M join_buffer_size = 8M read_buffer_size = 2M read_rnd_buffer_size = 16M sort_buffer_size = 4M max_heap_table_size = 256M tmp_table_size = 256M # InnoDB Settings transaction_prealloc_size = 8192 thread_handling = pool-of-threads aria_pagecache_buffer_size = 1G performance_schema_max_sql_text_length = 4096 max_digest_length = 4096 performance_schema_max_digest_length = 4096 performance_schema_digests_size = 20000 performance_schema_events_statements_history_size = 500 optimizer_search_depth = 62 innodb_force_recovery = 1 innodb_buffer_pool_size = 16G innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 2 innodb_flush_method = O_DIRECT innodb_log_buffer_size = 64M innodb_log_file_size = 4G innodb_temp_data_file_path = ibtmp1:64M:autoextend:max:20G [mysqldump] quick quote-names max_allowed_packet = 256M [isamchk] key_buffer = 16M