Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. # author: jiangchengyao@gmail.com
  2.  
  3. [mysql]
  4. prompt = [\\u@\\h][\\d]>\\_
  5.  
  6. [mysqld]
  7. # basic settings #
  8. user = mysql
  9. sql_mode = "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"
  10. autocommit = 1
  11. character_set_server=utf8mb4
  12. transaction_isolation = READ-COMMITTED
  13. explicit_defaults_for_timestamp = 1
  14. max_allowed_packet = 16777216
  15. event_scheduler = 1
  16.  
  17. # connection #
  18. interactive_timeout = 1800
  19. wait_timeout = 1800
  20. lock_wait_timeout = 1800
  21. skip_name_resolve = 1
  22. max_connections = 512
  23. max_connect_errors = 1000000
  24.  
  25. # session memory setting #
  26. read_buffer_size = 16777216
  27. read_rnd_buffer_size = 33554432
  28. sort_buffer_size = 33554432
  29. tmp_table_size = 67108864
  30. join_buffer_size = 134217728
  31.  
  32. # log settings #
  33. log_error = error.log
  34. slow_query_log = 1
  35. slow_query_log_file = slow.log
  36. log_queries_not_using_indexes = 1
  37. log_slow_admin_statements = 1
  38. log_slow_slave_statements = 1
  39. log_throttle_queries_not_using_indexes = 10
  40. expire_logs_days = 90
  41. long_query_time = 2
  42. min_examined_row_limit = 100
  43. binlog-rows-query-log-events = 1
  44. log-bin-trust-function-creators = 1
  45. expire-logs-days = 90
  46. log-slave-updates = 1
  47.  
  48. # innodb settings #
  49. innodb_page_size = 16384
  50. innodb_buffer_pool_size = 160G
  51. innodb_buffer_pool_instances = 16
  52. innodb_buffer_pool_load_at_startup = 1
  53. innodb_buffer_pool_dump_at_shutdown = 1
  54. innodb_lru_scan_depth = 4096
  55. innodb_lock_wait_timeout = 5
  56. innodb_io_capacity = 10000
  57. innodb_io_capacity_max = 20000
  58. innodb_flush_method = O_DIRECT
  59. innodb_file_format = Barracuda
  60. innodb_file_format_max = Barracuda
  61. innodb_undo_logs = 128
  62. innodb_undo_tablespaces = 3
  63. innodb_flush_neighbors = 0
  64. innodb_log_file_size = 17179869184
  65. innodb_log_files_in_group = 2
  66. innodb_log_buffer_size = 16777216
  67. innodb_purge_threads = 4
  68. innodb_large_prefix = 1
  69. innodb_thread_concurrency = 64
  70. innodb_print_all_deadlocks = 1
  71. innodb_strict_mode = 1
  72. innodb_sort_buffer_size = 67108864
  73. innodb_write_io_threads = 16
  74. innodb_read_io_threads = 16
  75. innodb_file_per_table = 1
  76. innodb_stats_persistent_sample_pages = 64
  77. innodb_autoinc_lock_mode = 2
  78.  
  79. # replication setting #
  80. master_info_repository = TABLE
  81. relay_log_info_repository = TABLE
  82. sync_binlog = 1
  83. gtid_mode = on
  84. enforce_gtid_consistency = 1
  85. log_slave_updates
  86. binlog_format = ROW
  87. binlog_rows_query_log_events = 1
  88. relay_log = relay.log
  89. relay_log_recovery = 1
  90. binlog_gtid_simple_recovery = 1
  91. slave_skip_errors = ddl_exist_errors
  92. slave-rows-search-algorithms = 'INDEX_SCAN,HASH_SCAN'
  93.  
  94. # semi sync replication settings #
  95. plugin_load = "validate_password.so;rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
  96. rpl_semi_sync_master_enabled = 1
  97. rpl_semi_sync_master_timeout = 3000
  98. rpl_semi_sync_slave_enabled = 1
  99.  
  100. # password plugin #
  101. validate_password_policy=STRONG
  102. validate-password=FORCE_PLUS_PERMANENT
  103.  
  104. [mysqld-5.7]
  105. # new innodb setting #
  106. loose_innodb_numa_interleave=1
  107. innodb_buffer_pool_dump_pct = 40
  108. innodb_page_cleaners = 16
  109. innodb_undo_log_truncate = 1
  110. innodb_max_undo_log_size = 2G
  111. innodb_purge_rseg_truncate_frequency = 128
  112. # new replication setting #
  113. slave-parallel-type = LOGICAL_CLOCK
  114. slave-parallel-workers = 16
  115. slave_preserve_commit_order=1
  116. slave_transaction_retries=128
  117. # other change setting #
  118. binlog_gtid_simple_recovery=1
  119. log_timestamps=system
  120. show_compatibility_56=on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement