[root@server~]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
server-id=9234
join_buffer_size=128K
read_rnd_buffer_size=256K
#query_cache_type = 1
max_heap_table_size=25M
lower_case_table_names=1
log_bin_trust_function_creators=1
skip_name_resolve
# skip_slave_start
slave_type_conversions="ALL_LOSSY,ALL_NON_LOSSY,ALL_SIGNED,ALL_UNSIGNED"
relay_log=mysql-relay
relay_log_index=relay-log-index
binlog_format=mixed
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
replicate-ignore-db=performance_schema
slave-skip-errors = 1032,1062,1677
max_connections=10000
#query_cache_size=500M
#query_cache_limit = 30M
#query_cache_type=1
table_open_cache=64
tmp_table_size=30M
thread_cache_size=9
innodb_flush_log_at_trx_commit=1
#innodb_buffer_pool_instances=5
# Determines the number of threads that can enter InnoDB concurrently.
innodb_concurrency_tickets=5000
# It specifies the maximum number of .ibd files that MySQL can keep open at one time. The minimum value is 10.
innodb_open_files=3000
innodb_file_per_table=1
#event_scheduler=1
innodb_buffer_pool_size=10G
innodb_additional_mem_pool_size=64M
innodb_buffer_pool_dump_at_shutdown=1
innodb_buffer_pool_dump_now=1
innodb_buffer_pool_load_abort=0
innodb_buffer_pool_load_at_startup=1
innodb_doublewrite=1
innodb_fast_shutdown=1
innodb_io_capacity=500
innodb_io_capacity_max=2000
innodb_max_dirty_pages_pct=75
innodb_open_files=500
#innodb_read_io_threads=20
#innodb_write_io_threads=20
innodb_thread_concurrency=9
#innodb_table_locks=0
max_allowed_packet=256M
max_connect_errors=10000
table_definition_cache=256
# Specify the maximum size of a row-based binary log event, in bytes.
# Rows are grouped into events smaller than this size if possible. The value should be a multiple of 256.
binlog_row_event_max_size=8K
# If the value of this variable is greater than 0, a replication slave synchronizes its master.info file to disk.
# (using fdatasync()) after every sync_master_info events.
sync_master_info=10000
# If the value of this variable is greater than 0, the MySQL server synchronizes its relay log to disk.
# (using fdatasync()) after every sync_relay_log writes to the relay log.
sync_relay_log=10000
# If the value of this variable is greater than 0, a replication slave synchronizes its relay-log.info file to disk.
# (using fdatasync()) after every sync_relay_log_info transactions.
sync_relay_log_info=10000
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
No comments:
Post a Comment