Advertisement
devops101

config-db

Aug 6th, 2020 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.14 KB | None | 0 0
  1. #
  2. # The Percona Server 5.7 configuration file.
  3. #
  4. # One can use all long options that the program supports.
  5. # Run program with --help to get a list of available options and with
  6. # --print-defaults to see which it would actually understand and use.
  7. #
  8. # For explanations see
  9. # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  10.  
  11. # Recommended in standard MySQL setup
  12. #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_ALL_TABLES
  13.  
  14. # Disabling symbolic-links is recommended to prevent assorted security risks
  15. #symbolic-links=0
  16. [client]
  17. port = 3306
  18. socket = /var/run/mysqld/mysqld.sock
  19.  
  20. # Here is entries for some specific programs
  21. # The following values assume you have at least 32M ram
  22.  
  23. # This was formally known as [safe_mysqld]. Both versions are currently parsed.
  24. [mysqld_safe]
  25. socket = /var/run/mysqld/mysqld.sock
  26.  
  27. [mysqld]
  28. #
  29. # * Basic Settings
  30. #
  31. user = mysql
  32. #pid-file = /tmp/mysqld.pid
  33. #socket = /tmp/mysqld.sock
  34. pid-file = /var/run/mysqld/mysqld.pid
  35. socket = /var/run/mysqld/mysqld.sock
  36. port = 3306
  37. basedir = /usr
  38. datadir = /var/lib/mysql
  39. tmpdir = /tmp
  40. lc-messages-dir = /usr/share/mysql
  41. skip-external-locking
  42. event_scheduler = ON
  43. default-authentication-plugin = mysql_native_password
  44. skip-host-cache
  45. skip-name-resolve
  46. lower_case_table_names = 0
  47. wait_timeout = 1800
  48. interactive_timeout = 1800
  49. net_read_timeout = 1800
  50. net_write_timeout = 1800
  51. sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
  52. # MyISAM #
  53. key-buffer-size = 16M
  54. myisam-recover-options = BACKUP
  55. #myisam-recover = BACKUP
  56.  
  57. # SAFETY #
  58. #max-connect-errors = 10
  59. #skip-name-resolve
  60.  
  61. # BINARY LOGGING #
  62. expire-logs-days = 7
  63.  
  64. performance_schema = ON
  65. # CACHES AND LIMITS #
  66. query-cache-type = 0
  67. query-cache-size = 0
  68. max-connections = 2500
  69. max_connect_errors = 99999
  70. #wait_timeout = 200
  71. #connect_timeout = 100
  72. max_user_connections = 10000
  73. thread-cache-size = 150
  74. open-files-limit = 65535
  75.  
  76. # INNODB #
  77. innodb_buffer_pool_load_at_startup = 1
  78. innodb_buffer_pool_dump_at_shutdown = 1
  79. innodb-flush-method = O_DIRECT
  80. innodb-log-files-in-group = 2
  81. innodb-log-file-size = 1G
  82. innodb-file-per-table = 1
  83.  
  84. innodb_checksum_algorithm = CRC32
  85. innodb_write_io_threads = 4
  86. innodb_read_io_threads = 4
  87. innodb_thread_concurrency = 0
  88. innodb-flush-log-at-trx-commit = 2
  89. innodb-buffer-pool-size = 8G
  90. innodb_buffer_pool_instances = 4
  91. innodb_purge_threads = 4
  92. innodb_io_capacity = 2000
  93. innodb_io_capacity_max = 4000
  94. innodb_stats_persistent_sample_pages = 300
  95. innodb_max_dirty_pages_pct = 80
  96. innodb_max_dirty_pages_pct_lwm = 10
  97. transaction_isolation = READ-COMMITTED
  98. innodb_autoinc_lock_mode = 2
  99. innodb_rollback_on_timeout = ON
  100. innodb_file_format = barracuda
  101. innodb_autoextend_increment = 64
  102. optimizer_switch=index_merge_intersection=off
  103. innodb_autoextend_increment = 512
  104.  
  105. max_allowed_packet = 1G
  106. tmp_table_size = 32M
  107. max_heap_table_size = 32M
  108. sort_buffer_size = 512K
  109. read-buffer-size = 512K
  110. read-rnd-buffer-size = 512K
  111. join_buffer_size = 512K
  112. table_open_cache = 8096
  113. table_definition_cache = 8096
  114. bulk_insert_buffer_size = 20M
  115. log_bin = ON
  116. binlog_format = ROW
  117. binlog_row_image = MINIMAL
  118. max_binlog_size = 1G
  119. binlog_rows_query_log_events = ON
  120. binlog_checksum = CRC32
  121. server-id = 65
  122. #log_slave_updates = TRUE
  123. open_files_limit = 1048576
  124. # LOGGING #
  125. log-error = /var/log/mysql/mysql-error.log
  126.  
  127. [mysqldump]
  128. quick
  129. max_allowed_packet = 16M
  130.  
  131. [mysql]
  132. #no-auto-rehash # faster start of mysql but no tab completition
  133. no-auto-rehash
  134. prompt = \u@\h:\d>
  135.  
  136.  
  137. [misamchk]
  138. key_buffer = 16M
  139.  
  140. #
  141. # * IMPORTANT: Additional settings that can override those from this file!
  142. # The files must end with '.cnf', otherwise they'll be ignored.
  143. #
  144. !includedir /etc/mysql/conf.d/
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement