[client]
port =3306
socket =/tmp/mysql3306.sock
[mysql]
prompt="\\u@\\h [\\d]>"
#pager="less -i -n -s"
#tee=/opt/mysq/query.log
no-auto-rehash
[mysqld]
#ssl
ssl-ca=ca.pem
ssl-cert=server-cert.pem
ssl-key=server-key.pem
require_secure_transport=ON
#misc
user = mysql
basedir = /usr/local/mysql
datadir = /data/mysql/msyql3306/data
port = 3306
socket = /tmp/msyql3306.sock
event_scheduler = 0
tmpdir = /data/mysql/mysql3306/tmp
#timeout
interactive_timeout = 300
wait_timeout = 300
#character set
character-set-server = utf8mb4
open_files_limit = 65535
max_connections = 2000
max_connect_errors = 100000
#lower_case_table_names =1
#logs
log-output = file
slow_query_log = 1
slow_query_log_file = slow.log
log-error = error.log
pid-file = mysql.pid
long_query_time = 1
#log-slow-admin-statesents = 1
#log-queries-not-using-indexes =1
log-slow-slave-statements = 1
#binlog
binlog_format = row
server-id = 3306
log-bin = /data/mysql/mysql3306/logs/mysql-bin
binlog_cache_size = 4M
max_binlog_size = 256M
max_binlog_cache_size = 1M
sync_binlog = 0
expire_logs_days = 10
log_bin_trust_function_creators = 1
gtid-mode = on
enforce_gtid_consistency = on
#myisam
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
#innodb
innodb_buffer_pool_size = 300M
innodb_buffer_pool_instances = 1
innodb_data_file_path = ibdata1:100M:autoextend
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 16M
innodb_log_file_size = 512M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 50
innodb_file_per_table = 1
innodb_rollback_on_timeout
innodb_io_capacity = 2000
transaction_isolation = READ-COMMITTED
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 0
innodb_read_io_threads = 4
innodb_write_io_threads = 4
innodb_print_all_deadlocks = on
innodb_deadlock_detect = on
innodb_lock_wait_timeout = 30
##for performance_schema
performance_schema = on
performance_schema_consumer_global_instrumentation = on # on
performance_schema_consumer_thread_instrumentation = on # on
performance_schema_consumer_events_stages_current = on # off
performance_schema_consumer_events_stages_history = on # off
performance_schema_consumer_events_stages_history_long =off
performance_schema_consumer_statements_digest = on
performance_schema_consumer_events_statements_current = on
performance_schema_consumer_events_statements_history = on
performance_schema_consumer_events_statements_history_long = off
performance_schema_consumer_events_waits_current = on
performance_schema_consumer_events_waits_history = on
performance_schema_consumer_events_waits_history_long = off
performance-schema-instrument ='memory/%=COUNTED'
网友评论