# # This group are read by MySQL server. # Use it for options that only the server (but not clients) should see # # For advice on how to change settings please see # http://dev.mysql.com/doc/refman/en/server-configuration-defaults.html # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mysqld according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld] mysqlx=OFF datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock log-error=/var/log/mysql/mysqld.log pid-file=/run/mysqld/mysqld.pid skip-name-resolve sql_mode = "IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES" server-id = 1 back_log = 50 max_connections = 2048 max_connect_errors = 2048 table_open_cache = 2048 max_allowed_packet = 128M binlog_cache_size = 1M max_heap_table_size = 64M read_buffer_size = 2M read_rnd_buffer_size = 16M sort_buffer_size = 8M join_buffer_size = 8M thread_cache_size = 8 thread_stack = 240K transaction_isolation = READ-COMMITTED tmp_table_size = 64M collation-server = utf8mb4_unicode_ci init-connect='SET NAMES utf8mb4' character-set-server = utf8mb4 slow_query_log long_query_time = 2 log-bin=mysql-bin binlog_format=mixed expire_logs_days = 15 key_buffer_size = 32M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 128M # 서버 메모리의 10%로 변경 myisam_max_sort_file_size = 800M #db 단독 운영시 서버 메모리의 60%, web과 함께 운영시 서버 메모리의 40%로 변경 innodb_buffer_pool_size = 4G innodb_data_file_path = ibdata1:10M:autoextend innodb_write_io_threads = 6 innodb_read_io_threads = 6 innodb_thread_concurrency = 0 innodb_flush_log_at_trx_commit = 1 innodb_log_buffer_size = 500M innodb_log_files_in_group = 3 innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 innodb_strict_mode = 0 innodb_flush_method = O_DIRECT innodb_doublewrite = 0