[mariadb] # 기본 설정 character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci init-connect = 'SET NAMES utf8mb4' # 메모리 최적화 (개발 환경용) innodb_buffer_pool_size = 1G innodb_log_buffer_size = 32M innodb_log_file_size = 256M key_buffer_size = 128M sort_buffer_size = 2M read_buffer_size = 1M read_rnd_buffer_size = 4M thread_cache_size = 25 table_open_cache = 2000 # 연결 설정 max_connections = 100 max_user_connections = 90 wait_timeout = 600 interactive_timeout = 600 # 쿼리 캐시 query_cache_type = 1 query_cache_size = 128M query_cache_limit = 1M # InnoDB 최적화 innodb_flush_log_at_trx_commit = 2 innodb_flush_method = O_DIRECT innodb_file_per_table = 1 innodb_io_capacity = 1000 innodb_io_capacity_max = 2000 innodb_read_io_threads = 2 innodb_write_io_threads = 2 # 시계열 데이터 최적화 innodb_compression_default = ON innodb_page_compression = ON innodb_adaptive_hash_index = ON # 로깅 general_log = OFF slow_query_log = ON slow_query_log_file = /var/log/mysql/slow.log long_query_time = 2 # 바이너리 로그 (백업/복제용) log_bin = mysql-bin binlog_format = ROW expire_logs_days = 7 max_binlog_size = 100M