Advertisement
Guest User

my.cnf

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