# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # # The MySQL Community Server configuration file. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld] server-id = 1 # master DB id for replication user = mysql port = 3306 socket = /var/run/mysqld/mysqld.sock pid-file = /var/run/mysqld/mysqld.pid basedir = /usr datadir = /home/mysql/db_data #/var/lib/mysql tmpdir = /tmp default-time-zone=Asia/Seoul init_connect = "SET NAMES utf8mb4" character-set-server = utf8mb4 collation-server = utf8mb4_unicode_ci skip-character-set-client-handshake skip-host-cache skip-name-resolve skip-external-locking skip-slave-start sysdate-is-now event-scheduler = ON general-log = OFF general-log-file = /home/mysql/db_log/general.log slow-query-log = ON slow-query-log-file = /home/mysql/db_log/slowquery.log long-query-time = 0.001 log-queries-not-using-indexes = ON log-bin = /home/mysql/db_log/mysql_bin log-error = /home/mysql/db_log/error.log binlog_cache_size = 2M binlog_format = MIXED binlog_row_image = MINIMAL max_binlog_size = 500M expire_logs_days = 10 log-warnings = 2 sync_binlog = 0 sql_mode = NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES log_output = FILE back_log = 1024 max_connections = 1024 max_connect_errors = 999999999 table_open_cache = 5000 max_allowed_packet = 4M max_heap_table_size = 128M tmp_table_size = 512M read_rnd_buffer_size = 128K read_buffer_size = 128K sort_buffer_size = 128K join_buffer_size = 128K thread_cache_size = 100 thread_concurrency = 8 thread_stack = 512K query_cache_type = DEMAND query_cache_size = 64M query_cache_limit = 512K ft_min_word_len = 4 wait_timeout = 30 interactive_timeout = 28800 connect_timeout = 300 default-storage-engine = INNODB #lower_case_table_names = 1 transaction_isolation = READ-COMMITTED log_bin_trust_function_creators = 1 open-files-limit = 65535 explicit_defaults_for_timestamp = TRUE ######################################## # INNODB Specific options ######################################## innodb_data_home_dir = /home/mysql/db_data #/var/lib/mysql innodb_log_group_home_dir = /home/mysql/db_data #/var/lib/mysql innodb_buffer_pool_size = 5GB #innodb_buffer_pool_instance = 8 innodb-buffer-pool-instances = 2 #innodb_data_file_path = ibdata1:1000M:autoextend innodb_file_per_table = 1 innodb_write_io_threads = 8 innodb_read_io_threads = 8 innodb_force_recovery = 0 innodb_thread_concurrency = 8 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 4M innodb_log_file_size = 500M innodb_log_files_in_group = 4 innodb_max_dirty_pages_pct = 80 innodb_flush_method = O_DIRECT innodb_lock_wait_timeout = 10 innodb_doublewrite = ON innodb_file_format = Barracuda innodb_file_format_max = Barracuda innodb_status_file = 1 innodb_adaptive_flushing = 1 innodb_use_native_aio = 1 #innodb_purge_thread = 1 innodb-purge-threads = 1 innodb_fast_shutdown = 0 innodb_stats_auto_recalc = OFF innodb_stats_persistent = OFF innodb_sort_buffer_size = 64M innodb_print_all_deadlocks = ON skip-innodb_adaptive_hash_index performance_schema = ON federated ######################################## ######################################## # Replication related settings ######################################## replicate-ignore-db = perf_mon replicate-ignore-db = sys replicate-ignore-db = moniter replicate-ignore-db = mysql #replicate-do-db = db_xxx # #relay_log_purge = OFF #relay-log = /usr1/mysql/DBSpace_hostname/RELAYLOG/mysql_relay #log_slave_update ######################################### ######################################## # MyISAM Specific options ######################################## key_buffer_size = 512M bulk_insert_buffer_size = 16M myisam_sort_buffer_size = 16M myisam_max_sort_file_size = 16M myisam_repair_threads = 1 #myisam_recover myisam-recover-options ######################################## performance_schema #lc-messages-dir = /usr/share/mysql56 # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. #bind-address = 127.0.0.1 # Recommended in standard MySQL setup # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # * IMPORTANT: Additional settings that can override those from this file! # The files must end with '.cnf', otherwise they'll be ignored. # #!includedir /etc/mysql/conf.d/ [mysqldump] quick max_allowed_packet = 64M [mysql] no-auto-rehash prompt = '[\h] (\d) \R:\m> ' [myisamchk] key_buffer_size = 64M sort_buffer_size = 16M read_buffer = 16M write_buffer = 16M [mysqlhotcopy] interactive-timeout [mysqld_safe] pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock nice = 0 open-files-limit = 65535