[client] user = root password = {{ mysql_root_password }} socket = {{ mysql_socket }} [mysql] default-character-set = utf8mb4 [mysqld] # Basic Settings user = mysql pid-file = {{ mysql_pid_file }} socket = {{ mysql_socket }} port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking # Character Set character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci init-connect = 'SET NAMES utf8mb4' # Fine Tuning key_buffer_size = 16M max_allowed_packet = 64M thread_stack = 192K thread_cache_size = 8 # Query Cache Configuration query_cache_type = 1 query_cache_limit = 2M query_cache_size = 32M # Logging and Replication log_error = {{ mysql_log_error }} expire_logs_days = 10 max_binlog_size = 100M # InnoDB Settings innodb_buffer_pool_size = {{ innodb_buffer_pool_size | default('256M') }} innodb_log_file_size = 64M innodb_file_per_table = 1 innodb_open_files = 400 innodb_io_capacity = 400 innodb_flush_method = O_DIRECT # WordPress Optimization max_connections = {{ max_connections | default('200') }} tmp_table_size = 32M max_heap_table_size = 32M table_open_cache = 2000 join_buffer_size = 256K sort_buffer_size = 1M read_buffer_size = 128K read_rnd_buffer_size = 256K # Security bind-address = 127.0.0.1