galaxydata

my.cnf-mariadb-10million-lines

Nov 14th, 2015
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 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 = 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 = 256M
  59. max_heap_table_size = 256M
  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 = BACKUP
  66. key_buffer_size = 1G
  67. #open-files-limit = 2000
  68. table_open_cache = 8192
  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 = 64M
  78. query_cache_size = 256M
  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. log_error = /var/lib/mysql/error.log
  90. #
  91. # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
  92. #
  93. # we do want to know about network errors and such
  94. log_warnings = 2
  95. #
  96. # Enable the slow query log to see queries with especially long duration
  97. #slow_query_log[={0|1}]
  98. slow_query_log_file = /var/log/mysql/mariadb-slow.log
  99. long_query_time = 10
  100. #log_slow_rate_limit = 1000
  101. log_slow_verbosity = query_plan
  102.  
  103. #log-queries-not-using-indexes
  104. #log_slow_admin_statements
  105. #
  106. # The following can be used as easy to replay backup logs or for replication.
  107. # note: if you are setting up a replication slave, see README.Debian about
  108. # other settings you may need to change.
  109. server-id = 1
  110. #report_host = master1
  111. #auto_increment_increment = 2
  112. #auto_increment_offset = 1
  113. #log_bin = /var/log/mysql/mariadb-bin
  114. log_bin = /var/log/mysql/mysql-bin.log
  115. binlog_do_db = iburg_public
  116. #log_bin_index = /var/log/mysql/mariadb-bin.index
  117. # not fab for performance, but safer
  118. #sync_binlog = 1
  119. expire_logs_days = 10
  120. max_binlog_size = 10G
  121. # slaves
  122. #relay_log = /var/log/mysql/relay-bin
  123. #relay_log_index = /var/log/mysql/relay-bin.index
  124. #relay_log_info_file = /var/log/mysql/relay-bin.info
  125. #log_slave_updates
  126. #read_only
  127. #
  128. # If applications support it, this stricter sql_mode prevents some
  129. # mistakes like inserting invalid dates etc.
  130. #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
  131. #
  132. # * InnoDB
  133. #
  134. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  135. # Read the manual for more InnoDB related options. There are many!
  136. default_storage_engine = InnoDB
  137. # you can't just change log file size, requires special procedure
  138. #innodb_log_file_size = 50M
  139. innodb_buffer_pool_size = 16384M
  140. innodb_log_buffer_size = 8M
  141. innodb_file_per_table = 1
  142. innodb_open_files = 400
  143. innodb_io_capacity = 400
  144. innodb_flush_method = O_DIRECT
  145. #
  146. # * Security Features
  147. #
  148. # Read the manual, too, if you want chroot!
  149. # chroot = /var/lib/mysql/
  150. #
  151. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  152. #
  153. # ssl-ca=/etc/mysql/cacert.pem
  154. # ssl-cert=/etc/mysql/server-cert.pem
  155. # ssl-key=/etc/mysql/server-key.pem
  156.  
  157.  
  158.  
  159. [mysqldump]
  160. quick
  161. quote-names
  162. max_allowed_packet = 16M
  163.  
  164. [mysql]
  165. #no-auto-rehash # faster start of mysql but no tab completition
  166.  
  167. [isamchk]
  168. key_buffer = 16M
  169.  
  170. #
  171. # * IMPORTANT: Additional settings that can override those from this file!
  172. # The files must end with '.cnf', otherwise they'll be ignored.
  173. #
  174. !includedir /etc/mysql/conf.d/
Advertisement
Add Comment
Please, Sign In to add comment