Advertisement
Guest User

Untitled

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