Advertisement
Guest User

Untitled

a guest
Apr 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. # MariaDB database server configuration file.
  2. #
  3. # You can copy this file to one of:
  4. # - "/etc/mysql/my.cnf" to set global options,
  5. # - "~/.my.cnf" to set user-specific options.
  6. #
  7. # One can use all long options that the program supports.
  8. # Run program with --help to get a list of available options and with
  9. # --print-defaults to see which it would actually understand and use.
  10. #
  11. # For explanations see
  12. # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  13.  
  14. # This will be passed to all mysql clients
  15. # It has been reported that passwords should be enclosed with ticks/quotes
  16. # escpecially if they contain "#" chars...
  17. # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
  18. [client]
  19. port = 3306
  20. socket = /var/run/mysqld/mysqld.sock
  21.  
  22. # Here is entries for some specific programs
  23. # The following values assume you have at least 32M ram
  24.  
  25. # This was formally known as [safe_mysqld]. Both versions are currently parsed.
  26. [mysqld_safe]
  27. socket = /var/run/mysqld/mysqld.sock
  28. nice = 0
  29.  
  30. [mysqld]
  31. #
  32. # * Basic Settings
  33. #
  34. user = mysql
  35. pid-file = /var/run/mysqld/mysqld.pid
  36. socket = /var/run/mysqld/mysqld.sock
  37. port = 3306
  38. basedir = /usr
  39. datadir = /var/lib/mysql
  40. tmpdir = /tmp
  41. lc_messages_dir = /usr/share/mysql
  42. lc_messages = en_US
  43. skip-external-locking
  44. #
  45. # Instead of skip-networking the default is now to listen only on
  46. # localhost which is more compatible and is not less secure.
  47. bind-address = 0.0.0.0 #127.0.0.1
  48. #
  49. # * Fine Tuning
  50. #
  51. max_connections = 100
  52. connect_timeout = 5
  53. wait_timeout = 600
  54. max_allowed_packet = 16M
  55. thread_cache_size = 128
  56. sort_buffer_size = 4M
  57. bulk_insert_buffer_size = 16M
  58. tmp_table_size = 32M
  59. max_heap_table_size = 32M
  60. #
  61. # * MyISAM
  62. #
  63. # This replaces the startup script and checks MyISAM tables if needed
  64. # the first time they are touched. On error, make copy and try a repair.
  65. myisam_recover_options = BACKUP
  66. key_buffer_size = 128M
  67. #open-files-limit = 2000
  68. table_open_cache = 400
  69. myisam_sort_buffer_size = 512M
  70. concurrent_insert = 2
  71. read_buffer_size = 2M
  72. read_rnd_buffer_size = 1M
  73. #
  74. # * Query Cache Configuration
  75. #
  76. # Cache only tiny result sets, so we can fit more in the query cache.
  77. query_cache_limit = 128K
  78. query_cache_size = 64M
  79. # for more write intensive setups, set to DEMAND or OFF
  80. #query_cache_type = DEMAND
  81. #
  82. # * Logging and Replication
  83. #
  84. # Both location gets rotated by the cronjob.
  85. # Be aware that this log type is a performance killer.
  86. # As of 5.1 you can enable the log at runtime!
  87. #general_log_file = /var/log/mysql/mysql.log
  88. #general_log = 1
  89. #
  90. # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
  91. #
  92. # we do want to know about network errors and such
  93. log_warnings = 2
  94. #
  95. # Enable the slow query log to see queries with especially long duration
  96. #slow_query_log[={0|1}]
  97. slow_query_log_file = /var/log/mysql/mariadb-slow.log
  98. long_query_time = 10
  99. #log_slow_rate_limit = 1000
  100. log_slow_verbosity = query_plan
  101.  
  102. #log-queries-not-using-indexes
  103. #log_slow_admin_statements
  104. #
  105. # The following can be used as easy to replay backup logs or for replication.
  106. # note: if you are setting up a replication slave, see README.Debian about
  107. # other settings you may need to change.
  108. #server-id = 1
  109. #report_host = master1
  110. #auto_increment_increment = 2
  111. #auto_increment_offset = 1
  112. log_bin = /var/log/mysql/mariadb-bin
  113. log_bin_index = /var/log/mysql/mariadb-bin.index
  114. # not fab for performance, but safer
  115. #sync_binlog = 1
  116. expire_logs_days = 10
  117. max_binlog_size = 100M
  118. # slaves
  119. #relay_log = /var/log/mysql/relay-bin
  120. #relay_log_index = /var/log/mysql/relay-bin.index
  121. #relay_log_info_file = /var/log/mysql/relay-bin.info
  122. #log_slave_updates
  123. #read_only
  124. #
  125. # If applications support it, this stricter sql_mode prevents some
  126. # mistakes like inserting invalid dates etc.
  127. #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
  128. #
  129. # * InnoDB
  130. #
  131. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  132. # Read the manual for more InnoDB related options. There are many!
  133. default_storage_engine = InnoDB
  134. # you can't just change log file size, requires special procedure
  135. #innodb_log_file_size = 50M
  136. innodb_buffer_pool_size = 256M
  137. innodb_log_buffer_size = 8M
  138. innodb_file_per_table = 1
  139. innodb_open_files = 400
  140. innodb_io_capacity = 400
  141. innodb_flush_method = O_DIRECT
  142. #
  143. # * Security Features
  144. #
  145. # Read the manual, too, if you want chroot!
  146. # chroot = /var/lib/mysql/
  147. #
  148. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  149. #
  150. # ssl-ca=/etc/mysql/cacert.pem
  151. # ssl-cert=/etc/mysql/server-cert.pem
  152. # ssl-key=/etc/mysql/server-key.pem
  153.  
  154. #
  155. # * Galera-related settings
  156. #
  157. [galera]
  158. # Mandatory settings
  159. #wsrep_on=ON
  160. #wsrep_provider=
  161. #wsrep_cluster_address=
  162. #binlog_format=row
  163. #default_storage_engine=InnoDB
  164. #innodb_autoinc_lock_mode=2
  165. #
  166. # Allow server to accept connections on all interfaces.
  167. #
  168. #bind-address=0.0.0.0
  169. #
  170. # Optional setting
  171. #wsrep_slave_threads=1
  172. #innodb_flush_log_at_trx_commit=0
  173.  
  174. [mysqldump]
  175. quick
  176. quote-names
  177. max_allowed_packet = 16M
  178.  
  179. [mysql]
  180. #no-auto-rehash # faster start of mysql but no tab completion
  181.  
  182. [isamchk]
  183. key_buffer = 16M
  184.  
  185. #
  186. # * IMPORTANT: Additional settings that can override those from this file!
  187. # The files must end with '.cnf', otherwise they'll be ignored.
  188. #
  189. !includedir /etc/mysql/conf.d/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement