Advertisement
Guest User

Untitled

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