Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. #Example MySQL clkonfig file for very large systems.
  2. #
  3. # This is for a large system with memory of 1G-2G where the system runs mainly
  4. # MySQL.
  5. #
  6. # You can copy this file to
  7. # /etc/my.cnf to set global options,
  8. # mysql-data-dir/my.cnf to set server-specific options (in this
  9. # installation this directory is /usr/local/mysql/data) or
  10. # ~/.my.cnf to set user-specific options.
  11. #
  12. # In this file, you can use all long options that a program supports.
  13. # If you want to know which options a program supports, run the program
  14. # with the "--help" option.
  15.  
  16. # The following options will be passed to all MySQL clients
  17. [client]
  18. #password = your_password
  19. port = 3306
  20. #socket = /tmp/mysql.sock
  21. default-character-set=utf8
  22.  
  23. # Here follows entries for some specific programs
  24.  
  25. # The MySQL server
  26. [mysqld]
  27. port = 3306
  28. #socket = /tmp/mysql.sock
  29. skip-locking
  30. key_buffer = 384M
  31. key_buffer_size = 100M
  32. max_allowed_packet = 100M
  33. table_cache = 512
  34. sort_buffer_size = 2M
  35. read_buffer_size = 2M
  36. read_rnd_buffer_size = 8M
  37. myisam_sort_buffer_size = 64M
  38. thread_stack = 192K
  39. thread_cache_size = 38
  40. query_cache_size = 32M
  41. # Try number of CPU's*2 for thread_concurrency
  42. thread_concurrency = 8
  43.  
  44. max_connections = 400
  45. table_cache = 200
  46.  
  47. query_cache_limit = 2M
  48. query_cache_size = 186M
  49.  
  50. #expire_logs_days = 10
  51. #max_binlog_size = 100M
  52.  
  53. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  54. # if all processes that need to connect to mysqld run on the same host.
  55. # All interaction with mysqld must be made via Unix sockets or named pipes.
  56. # Note that using this option without enabling named pipes on Windows
  57. # (via the "enable-named-pipe" option) will render mysqld useless!
  58. #
  59. #skip-networking
  60.  
  61. # Disable Federated by default
  62. #skip-federated
  63.  
  64. # Replication Master Server (default)
  65. # binary logging is required for replication
  66. #log-bin=mysql-bin
  67.  
  68. skip-log-bin
  69. skip-external-locking
  70. lower_case_table_names=1
  71.  
  72. default-storage-engine=INNODB
  73. default-character-set=utf8
  74. collation-server = utf8_general_ci
  75. init-connect='SET NAMES utf8'
  76. character-set-server = utf8
  77.  
  78. bind-address = 0.0.0.0
  79.  
  80. # required unique id between 1 and 2^32 - 1
  81. # defaults to 1 if master-host is not set
  82. # but will not function as a master if omitted
  83. server-id = 1
  84.  
  85. # Replication Slave (comment out master section to use this)
  86. #
  87. # To configure this host as a replication slave, you can choose between
  88. # two methods :
  89. #
  90. # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  91. # the syntax is:
  92. #
  93. # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  94. # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  95. #
  96. # where you replace <host>, <user>, <password> by quoted strings and
  97. # <port> by the master's port number (3306 by default).
  98. #
  99. # Example:
  100. #
  101. # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  102. # MASTER_USER='joe', MASTER_PASSWORD='secret';
  103. #
  104. # OR
  105. #
  106. # 2) Set the variables below. However, in case you choose this method, then
  107. # start replication for the first time (even unsuccessfully, for example
  108. # if you mistyped the password in master-password and the slave fails to
  109. # connect), the slave will create a master.info file, and any later
  110. # change in this file to the variables' values below will be ignored and
  111. # overridden by the content of the master.info file, unless you shutdown
  112. # the slave server, delete master.info and restart the slaver server.
  113. # For that reason, you may want to leave the lines below untouched
  114. # (commented) and instead use CHANGE MASTER TO (see above)
  115. #
  116. # required unique id between 2 and 2^32 - 1
  117. # (and different from the master)
  118. # defaults to 2 if master-host is set
  119. # but will not function as a slave if omitted
  120. #server-id = 2
  121. #
  122. # The replication master for this slave - required
  123. #master-host = <hostname>
  124. #
  125. # The username the slave will use for authentication when connecting
  126. # to the master - required
  127. #master-user = <username>
  128. #
  129. # The password the slave will authenticate with when connecting to
  130. # the master - required
  131. #master-password = <password>
  132. #
  133. # The port the master is listening on.
  134. # optional - defaults to 3306
  135. #master-port = <port>
  136. #
  137. # binary logging - not required for slaves, but recommended
  138. #log-bin=mysql-bin
  139. #
  140. # binary logging format - mixed recommended
  141. #binlog_format=mixed
  142.  
  143. # Point the following paths to different dedicated disks
  144. #tmpdir = /tmp/
  145. #log-update = /path-to-dedicated-directory/hostname
  146.  
  147. # Uncomment the following if you are using InnoDB tables
  148. #innodb_data_home_dir = /usr/local/mysql/data/
  149. #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
  150. #innodb_log_group_home_dir = /usr/local/mysql/data/
  151. # You can set .._buffer_pool_size up to 50 - 80 %
  152. # of RAM but beware of setting memory usage too high
  153. innodb_buffer_pool_size = 2G
  154. innodb_additional_mem_pool_size = 20M
  155. # Set .._log_file_size to 25 % of buffer pool size
  156. #innodb_log_file_size = 100M
  157. #innodb_log_buffer_size = 8M
  158. innodb_flush_log_at_trx_commit = 2
  159. #innodb_lock_wait_timeout = 50
  160.  
  161. innodb_file_per_table
  162.  
  163. [mysqldump]
  164. quick
  165. quote-names
  166. max_allowed_packet = 200M
  167.  
  168. [mysql]
  169. no-auto-rehash
  170. default-character-set=utf8
  171. # Remove the next comment character if you are not familiar with SQL
  172. #safe-updates
  173.  
  174. [isamchk]
  175. key_buffer = 256M
  176. sort_buffer_size = 256M
  177. read_buffer = 2M
  178. write_buffer = 2M
  179.  
  180. [myisamchk]
  181. key_buffer = 256M
  182. sort_buffer_size = 256M
  183. read_buffer = 2M
  184. write_buffer = 2M
  185.  
  186. [mysqlhotcopy]
  187. interactive-timeout
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement