Advertisement
Terrah

Prod repl my.cnf

Feb 27th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.51 KB | None | 0 0
  1. [mysqld]
  2. datadir=/var/lib/mysql
  3. socket=/var/lib/mysql/mysql.sock
  4.  
  5. # Disabling symbolic-links is recommended to prevent assorted security risks
  6. symbolic-links=0
  7.  
  8. # Ancon settings
  9. character-set-server=utf8
  10. default-storage-engine=INNODB
  11. lower_case_table_names=1
  12. sql_mode=''
  13. max_allowed_packet=1073741824
  14. log-error=/var/log/mysqld.log
  15. pid-file=/var/run/mysqld/mysqld.pid
  16.  
  17. log_bin=1
  18. innodb_flush_log_at_trx_commit=1
  19. sync_binlog=1
  20. server_id=0
  21.  
  22. # The maximum amount of concurrent sessions the MySQL server will
  23. # allow. One of these connections will be reserved for a user with
  24. # SUPER privileges to allow the administrator to login even if the
  25. # connection limit has been reached.
  26.  
  27. max_connections = 1000
  28. max_connect_errors = 10000
  29.  
  30. # Maximum allowed size for a single HEAP (in memory) table. This option
  31. # is a protection against the accidential creation of a very large HEAP
  32. # table which could otherwise use up all memory resources.
  33.  
  34. max_heap_table_size = 128M
  35.  
  36.  
  37. # Size of the buffer used for doing full table scans.
  38. # Allocated per thread, if a full scan is needed.
  39.  
  40. read_buffer_size = 128M
  41.  
  42.  
  43. # When reading rows in sorted order after a sort, the rows are read
  44. # through this buffer to avoid disk seeks. You can improve ORDER BY
  45. # performance a lot, if set this to a high value.
  46. # Allocated per thread, when needed.
  47. read_rnd_buffer_size = 128M
  48.  
  49.  
  50. # Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
  51. # queries. If sorted data does not fit into the sort buffer, a disk
  52. # based merge sort is used instead - See the "Sort_merge_passes"
  53. # status variable. Allocated per thread if sort is needed.
  54.  
  55. sort_buffer_size = 128M
  56.  
  57.  
  58. # This buffer is used for the optimization of full JOINs (JOINs without
  59. # indexes). Such JOINs are very bad for performance in most cases
  60. # anyway, but setting this variable to a large value reduces the
  61. # performance impact. See the "Select_full_join" status variable for a
  62. # count of full JOINs. Allocated per thread if full join is found
  63.  
  64. join_buffer_size = 128M
  65.  
  66.  
  67. # Query cache is used to cache SELECT results and later return them
  68. # without actual executing the same query once again. Having the query
  69. # cache enabled may result in significant speed improvements, if your
  70. # have a lot of identical queries and rarely changing tables. See the
  71. # "Qcache_lowmem_prunes" status variable to check if the current value
  72. # is high enough for your load.
  73. # Note: In case your tables change very often or if your queries are
  74. # textually different every time, the query cache may result in a
  75. # slowdown instead of a performance improvement.
  76.  
  77. query_cache_size = 1G
  78.  
  79.  
  80. # Only cache result sets that are smaller than this limit. This is to
  81. # protect the query cache of a very large result set overwriting all
  82. # other query results.
  83.  
  84. query_cache_limit = 256M
  85.  
  86.  
  87. # Thread stack size to use. This amount of memory is always reserved at
  88. # connection time. MySQL itself usually needs no more than 64K of
  89. # memory, while if you use your own stack hungry UDF functions or your
  90. # OS requires more stack for some operations, you might need to set this
  91. # to a higher value.
  92.  
  93. thread_stack = 512K
  94.  
  95.  
  96. # Set the default transaction isolation level. Levels available are:
  97. # READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
  98. transaction_isolation = READ-COMMITTED
  99.  
  100.  
  101. # Maximum size for internal (in-memory) temporary tables. If a table
  102. # grows larger than this value, it is automatically converted to disk
  103. # based table This limitation is for a single table. There can be many
  104. # of them.
  105.  
  106. tmp_table_size = 128M
  107.  
  108.  
  109. # Additional memory pool that is used by InnoDB to store metadata
  110. # information. If InnoDB requires more memory for this purpose it will
  111. # start to allocate it from the OS. As this is fast enough on most
  112. # recent operating systems, you normally do not need to change this
  113. # value. SHOW INNODB STATUS will display the current amount used.
  114.  
  115.  
  116. # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
  117. # row data. The bigger you set this the less disk I/O is needed to
  118. # access data in tables. On a dedicated database server you may set this
  119. # parameter up to 80% of the machine physical memory size. Do not set it
  120. # too large, though, because competition of the physical memory may
  121. # cause paging in the operating system. Note that on 32bit systems you
  122. # might be limited to 2-3.5G of user level memory per process, so do not
  123. # set it too high.
  124.  
  125. innodb_buffer_pool_size = 4G
  126.  
  127. [mysqld_safe]
  128. log-error=/var/log/mysqld.log
  129. pid-file=/var/run/mysqld/mysqld.pid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement