Guest User

Untitled

a guest
Jun 25th, 2011
560
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.94 KB | None | 0 0
  1. #
  2. # MariaDB database server configuration file.
  3. #
  4. # =================================================================
  5. # Base configuration courtesy of Open Query (http://openquery.com/)
  6. # For production use, case-specific preparation is still required.
  7. # 2009-10-07
  8. #
  9. # This is *not* an optimised config, merely a more sane baseline:
  10. # - InnoDB default (e.g., ACID out-of-the-box, same as on Windows)
  11. # - strict mode (for proper input checks, same as on Windows)
  12. # - various other useful settings
  13. # - make use of MariaDB/Percona/OurDelta enhancements/extensions
  14. #
  15. # For tuning assistance, please see http://openquery.com/services
  16. # =================================================================
  17. #
  18. # You can copy this file to one of:
  19. # - "/etc/mysql/my.cnf" to set global options,
  20. # - "~/.my.cnf" to set user-specific options.
  21. #
  22. # One can use all long options that the program supports.
  23. # Run program with --help to get a list of available options and with
  24. # --print-defaults to see which it would actually understand and use.
  25. #
  26. # For explanations see
  27. # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  28.  
  29. # This will be passed to all mysql clients
  30. # It has been reported that passwords should be enclosed with ticks/quotes
  31. # escpecially if they contain "#" chars...
  32. # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
  33. [client]
  34. port = 3306
  35. socket = /var/run/mysqld/mysqld.sock
  36. # Default is Latin1, if you need UTF-8 set this (also in server section)
  37. default-character-set = utf8
  38.  
  39. # Here is entries for some specific programs
  40. # The following values assume you have at least 32M ram
  41.  
  42. # This was formally known as [safe_mysqld]. Both versions are currently parsed.
  43. [mysqld_safe]
  44. socket = /var/run/mysqld/mysqld.sock
  45. nice = 0
  46.  
  47. [server]
  48. #
  49. # * Basic Settings
  50. #
  51. user = mysql
  52. pid-file = /var/run/mysqld/mysqld.pid
  53. socket = /var/run/mysqld/mysqld.sock
  54. port = 3306
  55. basedir = /usr
  56. datadir = /var/lib/mysql
  57. tmpdir = /tmp
  58. language = /usr/share/mysql/english
  59. skip-external-locking
  60. #
  61. # * Character sets
  62. #
  63. # Default is Latin1, if you need UTF-8 set all this (also in client section)
  64. #
  65. #default-character-set = utf8
  66. #default-collation = utf8_general_ci
  67. character_set_server = utf8
  68. collation_server = utf8_general_ci
  69. #
  70. # Instead of skip-networking the default is now to listen only on
  71. # localhost which is more compatible and is not less secure.
  72. bind-address = 127.0.0.1
  73. #
  74. # * Fine Tuning
  75. #
  76. max_connections = 75
  77. connect_timeout = 5
  78. wait_timeout = 30
  79. interactive_timeout = 120
  80.  
  81. thread_concurrency = 6
  82. max_allowed_packet = 4M
  83. thread_cache_size = 8
  84. sort_buffer_size = 1M
  85. bulk_insert_buffer_size = 512K
  86. tmp_table_size = 512K
  87. max_heap_table_size = 2M
  88. thread_stack = 192K
  89.  
  90. #
  91. # * MyISAM
  92. #
  93. # This replaces the startup script and checks MyISAM tables if needed
  94. # the first time they are touched. On error, make copy and try a repair.
  95. myisam_recover = BACKUP
  96. key_buffer_size = 32M
  97. table_open_cache = 128
  98. myisam_sort_buffer_size = 1M
  99. concurrent_insert = 2
  100. read_buffer_size = 256K
  101. read_rnd_buffer_size = 256K
  102. #
  103. # * Query Cache Configuration
  104. #
  105. # Cache only tiny result sets, so we can fit more in the query cache.
  106. query_cache_limit = 256K
  107. query_cache_size = 8M
  108. # for more write intensive setups, set to DEMAND or OFF
  109. #query_cache_type = DEMAND
  110. #
  111. # * Logging and Replication
  112. #
  113. # Both location gets rotated by the cronjob.
  114. # Be aware that this log type is a performance killer.
  115. # As of 5.1 you can enable the log at runtime!
  116. #general_log_file = /var/log/mysql/mysql.log
  117. #general_log = 1
  118. #
  119. # Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
  120. #
  121. # we do want to know about network errors and such
  122. log_warnings = 2
  123. #
  124. # Enable the slow query log to see queries with especially long duration
  125. slow_query_log = 1 #[={0|1}]
  126. slow_query_log_file = /var/log/mysql/mariadb-slow.log
  127. long_query_time = 5
  128. #log_slow_rate_limit = 1000
  129. log_slow_verbosity = query_plan
  130.  
  131. #log-queries-not-using-indexes
  132. #log_slow_admin_statements
  133. #
  134. # The following can be used as easy to replay backup logs or for replication.
  135. # note: if you are setting up a replication slave, see README.Debian about
  136. # other settings you may need to change.
  137. #server-id = 1
  138. #report_host = master1
  139. #auto_increment_increment = 2
  140. #auto_increment_offset = 1
  141. #log_bin = /var/log/mysql/mariadb-bin
  142. #log_bin_index = /var/log/mysql/mariadb-bin.index
  143. # not fab for performance, but safer
  144. #sync_binlog = 1
  145. expire_logs_days = 10
  146. max_binlog_size = 100M
  147. # slaves
  148. #relay_log = /var/log/mysql/relay-bin
  149. #relay_log_index = /var/log/mysql/relay-bin.index
  150. #relay_log_info_file = /var/log/mysql/relay-bin.info
  151. #log_slave_updates
  152. #read_only
  153. #
  154. # If applications support it, this stricter sql_mode prevents some
  155. # mistakes like inserting invalid dates etc.
  156. #sql_mode = NO_ENGINE_SUBSTITUTION,TRADITIONAL
  157. #
  158. # * InnoDB
  159. #
  160. ## InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  161. ## Read the manual for more InnoDB related options. There are many!
  162. #default_storage_engine = InnoDB
  163. ## you can't just change log file size, requires special procedure
  164. ##innodb_log_file_size = 50M
  165. #innodb_buffer_pool_size = 256M
  166. #innodb_log_buffer_size = 8M
  167. #innodb_file_per_table = 1
  168. #innodb_open_files = 400
  169. #innodb_io_capacity = 400
  170. #innodb_flush_method = O_DIRECT
  171.  
  172. skip-innodb
  173. skip-federated
  174. skip-archive
  175. skip-pbxt
  176. skip-blackhole
  177. skip-csv
  178. skip-mrg_myisam
  179.  
  180. skip-pbxt_statistics
  181. skip-innodb_rseg
  182. skip-innodb_buffer_pool_pages
  183. skip-innodb_buffer_pool_pages_index
  184. skip-innodb_buffer_pool_pages_blob
  185. skip-innodb_trx
  186. skip-innodb_locks
  187. skip-innodb_lock_waits
  188. skip-innodb_cmp
  189. skip-innodb_cmp_reset
  190. skip-innodb_cmpmem
  191. skip-innodb_cmpmem_reset
  192. skip-innodb_table_stats
  193. skip-innodb_index_stats
  194. skip-innodb_sys_tables
  195. skip-innodb_sys_indexes
  196. skip-innodb_sys_stats
  197. skip-xtradb_admin_command
  198. skip-xtradb_enhancements
  199.  
  200. #
  201. # * Security Features
  202. #
  203. # Read the manual, too, if you want chroot!
  204. # chroot = /var/lib/mysql/
  205. #
  206. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  207. #
  208. # ssl-ca=/etc/mysql/cacert.pem
  209. # ssl-cert=/etc/mysql/server-cert.pem
  210. # ssl-key=/etc/mysql/server-key.pem
  211.  
  212.  
  213.  
  214. [mysqldump]
  215. quick
  216. quote-names
  217. max_allowed_packet = 16M
  218.  
  219. [mysql]
  220. #no-auto-rehash # faster start of mysql but no tab completition
  221.  
  222. [isamchk]
  223. key_buffer = 16M
  224.  
  225. #
  226. # * IMPORTANT: Additional settings that can override those from this file!
  227. # The files must end with '.cnf', otherwise they'll be ignored.
  228. #
  229. !includedir /etc/mysql/conf.d/
Advertisement
Add Comment
Please, Sign In to add comment