custom.cnf 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. ## custom configuration file, please be aware that changing options here may break things
  2. [mysqld_safe]
  3. nice = 0
  4. [mysqld]
  5. #mmi
  6. log_bin_trust_function_creators = true
  7. character-set-server = utf8
  8. max_connections = 100
  9. connect_timeout = 5
  10. wait_timeout = 600
  11. max_allowed_packet = 16M
  12. thread_cache_size = 128
  13. sort_buffer_size = 4M
  14. bulk_insert_buffer_size = 16M
  15. tmp_table_size = 32M
  16. max_heap_table_size = 32M
  17. binlog_format=mixed
  18. #
  19. # * MyISAM
  20. #
  21. # This replaces the startup script and checks MyISAM tables if needed
  22. # the first time they are touched. On error, make copy and try a repair.
  23. myisam_recover_options = BACKUP
  24. key_buffer_size = 128M
  25. #open-files-limit = 2000
  26. table_open_cache = 400
  27. myisam_sort_buffer_size = 512M
  28. concurrent_insert = 2
  29. read_buffer_size = 2M
  30. read_rnd_buffer_size = 1M
  31. #
  32. # * Query Cache Configuration
  33. #
  34. # Cache only tiny result sets, so we can fit more in the query cache.
  35. query_cache_limit = 128K
  36. query_cache_size = 64M
  37. # for more write intensive setups, set to DEMAND or OFF
  38. #query_cache_type = DEMAND
  39. #
  40. # * Logging and Replication
  41. #
  42. # Both location gets rotated by the cronjob.
  43. # Be aware that this log type is a performance killer.
  44. # As of 5.1 you can enable the log at runtime!
  45. #general_log_file = /config/log/mysql/mysql.log
  46. #general_log = 1
  47. #
  48. # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
  49. #
  50. # we do want to know about network errors and such
  51. log_warnings = 2
  52. #
  53. # Enable the slow query log to see queries with especially long duration
  54. #slow_query_log[={0|1}]
  55. slow_query_log_file = /config/log/mysql/mariadb-slow.log
  56. long_query_time = 10
  57. #log_slow_rate_limit = 1000
  58. log_slow_verbosity = query_plan
  59. #log-queries-not-using-indexes
  60. #log_slow_admin_statements
  61. #
  62. # The following can be used as easy to replay backup logs or for replication.
  63. # note: if you are setting up a replication slave, see README.Debian about
  64. # other settings you may need to change.
  65. #server-id = 1
  66. #report_host = master1
  67. #auto_increment_increment = 2
  68. #auto_increment_offset = 1
  69. log_bin = /config/log/mysql/mariadb-bin
  70. log_bin_index = /config/log/mysql/mariadb-bin.index
  71. # not fab for performance, but safer
  72. #sync_binlog = 1
  73. expire_logs_days = 10
  74. max_binlog_size = 100M
  75. # slaves
  76. #relay_log = /config/log/mysql/relay-bin
  77. #relay_log_index = /config/log/mysql/relay-bin.index
  78. #relay_log_info_file = /config/log/mysql/relay-bin.info
  79. #log_slave_updates
  80. #read_only
  81. #
  82. # If applications support it, this stricter sql_mode prevents some
  83. # mistakes like inserting invalid dates etc.
  84. #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
  85. #
  86. # * InnoDB
  87. #
  88. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  89. # Read the manual for more InnoDB related options. There are many!
  90. default_storage_engine = InnoDB
  91. # you can't just change log file size, requires special procedure
  92. #innodb_log_file_size = 50M
  93. innodb_buffer_pool_size = 256M
  94. innodb_log_buffer_size = 8M
  95. innodb_file_per_table = 1
  96. innodb_open_files = 400
  97. innodb_io_capacity = 400
  98. innodb_flush_method = O_DIRECT
  99. #
  100. # * Security Features
  101. #
  102. # Read the manual, too, if you want chroot!
  103. # chroot = /var/lib/mysql/
  104. #
  105. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  106. #
  107. # ssl-ca=/etc/mysql/cacert.pem
  108. # ssl-cert=/etc/mysql/server-cert.pem
  109. # ssl-key=/etc/mysql/server-key.pem
  110. #
  111. # * Galera-related settings
  112. #
  113. [galera]
  114. # Mandatory settings
  115. #wsrep_on=ON
  116. #wsrep_provider=
  117. #wsrep_cluster_address=
  118. #binlog_format=row
  119. #default_storage_engine=InnoDB
  120. #innodb_autoinc_lock_mode=2
  121. #
  122. # Allow server to accept connections on all interfaces.
  123. #
  124. #bind-address=0.0.0.0
  125. #
  126. # Optional setting
  127. #wsrep_slave_threads=1
  128. #innodb_flush_log_at_trx_commit=0
  129. [mysqldump]
  130. quick
  131. quote-names
  132. max_allowed_packet = 16M
  133. [mysql]
  134. #no-auto-rehash # faster start of mysql but no tab completion
  135. [isamchk]
  136. key_buffer_size = 16M