Advertisement
Juc1

etc mysql my cnf

Oct 14th, 2013
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.78 KB | None | 0 0
  1. #
  2. # The MySQL database server configuration file.
  3. #
  4. # You can copy this to one of:
  5. # - "/etc/mysql/my.cnf" to set global options,
  6. # - "~/.my.cnf" to set user-specific options.
  7. #
  8. # One can use all long options that the program supports.
  9. # Run program with --help to get a list of available options and with
  10. # --print-defaults to see which it would actually understand and use.
  11. #
  12. # For explanations see
  13. # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
  14.  
  15. # This will be passed to all mysql clients
  16. # It has been reported that passwords should be enclosed with ticks/quotes
  17. # escpecially if they contain "#" chars...
  18. # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
  19. [client]
  20. port = 3306
  21.  
  22. socket = /var/run/mysqld/mysqld.sock
  23.  
  24. # Here is entries for some specific programs
  25. # The following values assume you have at least 32M ram
  26.  
  27. # This was formally known as [safe_mysqld]. Both versions are currently parsed.
  28. [mysqld_safe]
  29. socket = /var/run/mysqld/mysqld.sock
  30. nice = 0
  31.  
  32. #set-variable = innodb_buffer_pool_size=2M
  33. #set-variable = innodb_additional_mem_pool_size=500K
  34. #set-variable = innodb_log_buffer_size=500K
  35. #set-variable = innodb_thread_concurrency=2
  36. [mysqld]
  37. set-variable=local-infile=0
  38. #
  39. # * Basic Settings
  40. #
  41. user = mysql
  42. pid-file = /var/run/mysqld/mysqld.pid
  43. socket = /var/run/mysqld/mysqld.sock
  44. port = 3306
  45. basedir = /usr
  46. datadir = /var/lib/mysql
  47. tmpdir = /tmp
  48. language = /usr/share/mysql/english
  49. skip-locking
  50.  
  51.  
  52. #innodb_force_recovery = 4
  53.  
  54. #
  55. # Instead of skip-networking the default is now to listen only on
  56. # localhost which is more compatible and is not less secure.
  57. # bind-address = 127.0.0.1
  58. #
  59. # * Fine Tuning
  60. #
  61. #key_buffer = 16K
  62. max_allowed_packet = 32M
  63. thread_stack = 64K
  64. #thread_cache_size = 4
  65. # This replaces the startup script and checks MyISAM tables if needed
  66. # the first time they are touched
  67. myisam-recover = BACKUP
  68.  
  69. max_connections = 500
  70. max_user_connections = 500
  71. key_buffer = 36M
  72. myisam_sort_buffer_size = 64M
  73. join_buffer_size = 2M
  74. read_buffer_size = 2M
  75. sort_buffer_size = 3M
  76. table_cache = 1024
  77. thread_cache_size = 286
  78. interactive_timeout = 25
  79. wait_timeout = 1800
  80. connect_timeout = 10
  81. max_allowed_packet = 1M
  82. max_connect_errors = 999999
  83. query_cache_limit = 1M
  84. query_cache_size = 16M
  85. query_cache_type = 1
  86. tmp_table_size = 16M
  87.  
  88. #max_connections = 100
  89. #table_cache = 64
  90. #thread_concurrency = 10
  91. #
  92. # * Query Cache Configuration
  93. #
  94. #query_cache_limit = 1M
  95. #query_cache_size = 16M
  96. #
  97. # * Logging and Replication
  98. #
  99. # Both location gets rotated by the cronjob.
  100. # Be aware that this log type is a performance killer.
  101. log = /var/log/mysql/mysql.log
  102. #
  103. # Error logging goes to syslog. This is a Debian improvement :)
  104. #
  105. # Here you can see queries with especially long duration
  106. #log_slow_queries = /var/log/mysql/mysql-slow.log
  107. #long_query_time = 2
  108. #log-queries-not-using-indexes
  109. #
  110. # The following can be used as easy to replay backup logs or for replication.
  111. # note: if you are setting up a replication slave, see README.Debian about
  112. # other settings you may need to change.
  113. #server-id = 1
  114. #log_bin = /var/log/mysql/mysql-bin.log
  115. expire_logs_days = 10
  116. max_binlog_size = 100M
  117. #binlog_do_db = include_database_name
  118. #binlog_ignore_db = include_database_name
  119. #
  120. # * BerkeleyDB
  121. #
  122. # Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
  123. skip-bdb
  124. #
  125. # * InnoDB
  126. #
  127. # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
  128. # Read the manual for more InnoDB related options. There are many!
  129. # You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
  130. skip-innodb
  131. #
  132. # * Security Features
  133. #
  134. # Read the manual, too, if you want chroot!
  135. # chroot = /var/lib/mysql/
  136. #
  137. # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
  138. #
  139. # ssl-ca=/etc/mysql/cacert.pem
  140. # ssl-cert=/etc/mysql/server-cert.pem
  141. # ssl-key=/etc/mysql/server-key.pem
  142.  
  143.  
  144.  
  145. #set-variable = innodb_buffer_pool_size=2M
  146. #set-variable = innodb_additional_mem_pool_size=500K
  147. #set-variable = innodb_log_buffer_size=500K
  148. #set-variable = innodb_thread_concurrency=2
  149. [mysqldump]
  150. quick
  151. quote-names
  152. max_allowed_packet = 16M
  153.  
  154. [mysql]
  155. #no-auto-rehash # faster start of mysql but no tab completition
  156.  
  157. [isamchk]
  158. key_buffer = 16M
  159.  
  160. #
  161. # * NDB Cluster
  162. #
  163. # See /usr/share/doc/mysql-server-*/README.Debian for more information.
  164. #
  165. # The following configuration is read by the NDB Data Nodes (ndbd processes)
  166. # not from the NDB Management Nodes (ndb_mgmd processes).
  167. #
  168. # [MYSQL_CLUSTER]
  169. # ndb-connectstring=127.0.0.1
  170.  
  171.  
  172. #
  173. # * IMPORTANT: Additional settings that can override those from this file!
  174. # The files must end with '.cnf', otherwise they'll be ignored.
  175. #
  176. !includedir /etc/mysql/conf.d/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement