weekyuan

test

Oct 11th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 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 /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.  
  22. # Here follows entries for some specific programs
  23.  
  24. # The MySQL server
  25. [mysqld]
  26. port = 3306
  27. socket = /tmp/mysql.sock
  28. skip-locking
  29. key_buffer = 256M
  30. max_allowed_packet = 32M
  31. table_cache = 1024
  32. sort_buffer_size = 1M
  33. read_buffer_size = 1M
  34. read_rnd_buffer_size = 8M
  35. myisam_sort_buffer_size = 64M
  36. thread_cache_size = 40
  37. query_cache_size = 32M
  38. # Try number of CPU's*2 for thread_concurrency
  39. thread_concurrency = 16
  40.  
  41.  
  42.  
  43. ###### QWQ add start ######
  44.  
  45. #bind-address = 127.0.0.1
  46.  
  47. pid-file=/data/mysql/data/mysqld.pid
  48. datadir=/data/mysql/data
  49. tmpdir=/data/mysql/data
  50. slave-load-tmpdir=/data/mysql/data
  51.  
  52. local_infile = off
  53. max_connections = 2048
  54. wait_timeout = 60
  55. interactive_timeout = 60
  56. thread_stack = 1M
  57.  
  58. # The --log-warnings server option now is enabled by default
  59. skip-log-warnings
  60.  
  61. # See http://www.mysql.com/doc/en/Stability.html
  62. skip-external-locking
  63. skip-name-resolve
  64.  
  65. # See http://www.mysql.com/doc/en/Symbolic_links_to_tables.html
  66. skip-symbolic-links
  67.  
  68. # No InnoDB for now
  69. #skip-innodb
  70.  
  71. # No NDB for now
  72. #skip-ndbcluster
  73.  
  74. # Log slow queries and the queries which do not use indexes
  75. #slow_query_log
  76. #slow_query_log_file = /data/mysql/data/mysqld-slow.log
  77. log-slow-queries = /data/mysql/data/mysqld-slow.log
  78. log-queries-not-using-indexes
  79. long-query-time = 2
  80.  
  81. #log-error
  82. log-error = /data/mysql/data/mysqld.err
  83.  
  84. # Replication Master Server (default)
  85. log-bin = /data/mysql/data/mysqld-bin
  86. max_binlog_size=1G
  87. expire_logs_days=10
  88. #binlog-do-db=db_name1
  89. #binlog-do-db=db_name2
  90. #binlog-ignore-db=db_name1
  91. #binlog-ignore-db=db_name2
  92.  
  93. # Replication Slave Server (comment out master section to use this)
  94. master-host=
  95. master-user=repler
  96. master-password=qihoo.net
  97. master-port=3306
  98. report-host=
  99. relay-log=/data/mysql/data/relay-bin
  100. max-relay-log-size=1G
  101. relay-log-space-limit=0
  102. relay-log-purge=1
  103. #master-retry-count=999
  104. master-connect-retry=1
  105. #log-bin=/data/mysql/data/mysqld-bin # not required for slaves, but recommended
  106. #replicate-do-db=cacti
  107. #replicate-do-db=cacti_db1
  108. #replicate-do-db=mysql
  109. #replicate-do-db=db_name1
  110. #replicate-do-db=db_name2
  111. #replicate-do-table=db_name.tbl_name1
  112. #replicate-do-table=db_name.tbl_name2
  113. #replicate-ignore-db=db_name1
  114. #replicate-ignore-db=db_name2
  115. #replicate-ignore-table=db_name.tbl_name1
  116. #replicate-ignore-table=db_name.tbl_name2
  117. #replicate-wild-do-table=db.%
  118. replicate-same-server-id = 0 # use the default setting of 0, to prevent infinite loops caused by circular replication.
  119. log-slave-updates
  120. slave-skip-errors=all
  121. sync_binlog=0
  122. #auto_increment_increment=2
  123. #auto_increment_offset=1
  124. #skip-slave-start
Add Comment
Please, Sign In to add comment