Advertisement
Guest User

Untitled

a guest
Jul 11th, 2018
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.09 KB | None | 0 0
  1. # Other default tuning values
  2. # MySQL Server Instance Configuration File
  3. # ----------------------------------------------------------------------
  4. # Generated by the MySQL Server Instance Configuration Wizard
  5. #
  6. #
  7. # Installation Instructions
  8. # ----------------------------------------------------------------------
  9. #
  10. # On Linux you can copy this file to /etc/my.cnf to set global options,
  11. # mysql-data-dir/my.cnf to set server-specific options
  12. # (@localstatedir@ for this installation) or to
  13. # ~/.my.cnf to set user-specific options.
  14. #
  15. # On Windows you should keep this file in the installation directory
  16. # of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To
  17. # make sure the server reads the config file use the startup option
  18. # "--defaults-file".
  19. #
  20. # To run run the server from the command line, execute this in a
  21. # command line shell, e.g.
  22. # mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini"
  23. #
  24. # To install the server as a Windows service manually, execute this in a
  25. # command line shell, e.g.
  26. # mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y
  27.  
  28. \my.ini"
  29. #
  30. # And then execute this in a command line shell to start the server, e.g.
  31. # net start MySQLXY
  32. #
  33. #
  34. # Guildlines for editing this file
  35. # ----------------------------------------------------------------------
  36. #
  37. # In this file, you can use all long options that the program supports.
  38. # If you want to know the options a program supports, start the program
  39. # with the "--help" option.
  40. #
  41. # More detailed information about the individual options can also be
  42. # found in the manual.
  43. #
  44. # For advice on how to change settings please see
  45. # http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
  46. #
  47. #
  48. # CLIENT SECTION
  49. # ----------------------------------------------------------------------
  50. #
  51. # The following options will be read by MySQL client applications.
  52. # Note that only client applications shipped by MySQL are guaranteed
  53. # to read this section. If you want your own MySQL client program to
  54. # honor these values, you need to specify it as an option during the
  55. # MySQL client library initialization.
  56. #
  57. [client]
  58. no-beep
  59.  
  60. # pipe
  61. # socket=0.0
  62. port=3306
  63.  
  64. [mysql]
  65.  
  66. default-character-set=utf8
  67. collation-server=utf8_bin
  68.  
  69. # SERVER SECTION
  70. # ----------------------------------------------------------------------
  71. #
  72. # The following options will be read by the MySQL Server. Make sure that
  73. # you have installed the server correctly (see above) so it reads this
  74. # file.
  75. #
  76. # server_type=1
  77. [mysqld]
  78.  
  79. # The next three options are mutually exclusive to SERVER_PORT below.
  80. # skip-networking
  81.  
  82. # enable-named-pipe
  83.  
  84. # shared-memory
  85.  
  86. # shared-memory-base-name=MYSQL
  87.  
  88. # The Pipe the MySQL Server will use
  89. # socket=MYSQL
  90.  
  91. # The TCP/IP Port the MySQL Server will listen on
  92. port=3306
  93.  
  94. # Path to installation directory. All paths are usually resolved relative to this.
  95. # basedir="C:/Program Files/MySQL/MySQL Server 5.6/"
  96.  
  97. # Path to the database root
  98. datadir=C:/ProgramData/MySQL/MySQL Server 5.6/Data
  99.  
  100. # The default character set that will be used when a new schema or table is
  101. # created and no character set is defined
  102. character-set-server=utf8
  103.  
  104. # The default storage engine that will be used when create new tables when
  105. default-storage-engine=INNODB
  106.  
  107. # Set the SQL mode to strict
  108. sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
  109.  
  110. # Enable Windows Authentication
  111. # plugin-load=authentication_windows.dll
  112.  
  113. # General and Slow logging.
  114. log-output=FILE
  115. general-log=0
  116. general_log_file="DB-MYSQL56320.log"
  117. slow-query-log=1
  118. slow_query_log_file="DB-MYSQL56320-slow.log"
  119. long_query_time=10
  120.  
  121. # Binary Logging.
  122. # log-bin
  123.  
  124. # Error Logging.
  125. log-error="DB-MYSQL56320.err"
  126.  
  127. # Server Id.
  128. server-id=1
  129.  
  130. # Secure File Priv.
  131. secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.6/Uploads"
  132.  
  133. # The maximum amount of concurrent sessions the MySQL server will
  134. # allow. One of these connections will be reserved for a user with
  135. # SUPER privileges to allow the administrator to login even if the
  136. # connection limit has been reached.
  137. max_connections=400
  138.  
  139. # Query cache is used to cache SELECT results and later return them
  140. # without actual executing the same query once again. Having the query
  141. # cache enabled may result in significant speed improvements, if your
  142. # have a lot of identical queries and rarely changing tables. See the
  143. # "Qcache_lowmem_prunes" status variable to check if the current value
  144. # is high enough for your load.
  145. # Note: In case your tables change very often or if your queries are
  146. # textually different every time, the query cache may result in a
  147. # slowdown instead of a performance improvement.
  148. query_cache_size=16M
  149.  
  150. # The number of open tables for all threads. Increasing this value
  151. # increases the number of file descriptors that mysqld requires.
  152. # Therefore you have to make sure to set the amount of open files
  153. # allowed to at least 4096 in the variable "open-files-limit" in
  154. # section [mysqld_safe]
  155. table_open_cache=2000
  156.  
  157. # Maximum size for internal (in-memory) temporary tables. If a table
  158. # grows larger than this value, it is automatically converted to disk
  159. # based table This limitation is for a single table. There can be many
  160. # of them.
  161. tmp_table_size=853M
  162.  
  163. # How many threads we should keep in a cache for reuse. When a client
  164. # disconnects, the client's threads are put in the cache if there aren't
  165. # more than thread_cache_size threads from before. This greatly reduces
  166. # the amount of thread creations needed if you have a lot of new
  167. # connections. (Normally this doesn't give a notable performance
  168. # improvement if you have a good thread implementation.)
  169. thread_cache_size=10
  170.  
  171. #*** MyISAM Specific options
  172. # The maximum size of the temporary file MySQL is allowed to use while
  173. # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
  174. # If the file-size would be bigger than this, the index will be created
  175. # through the key cache (which is slower).
  176. myisam_max_sort_file_size=100G
  177.  
  178. # If the temporary file used for fast index creation would be bigger
  179. # than using the key cache by the amount specified here, then prefer the
  180. # key cache method. This is mainly used to force long character keys in
  181. # large tables to use the slower key cache method to create the index.
  182. myisam_sort_buffer_size=3G
  183.  
  184. # Size of the Key Buffer, used to cache index blocks for MyISAM tables.
  185. # Do not set it larger than 30% of your available memory, as some memory
  186. # is also required by the OS to cache rows. Even if you're not using
  187. # MyISAM tables, you should still set it to 8-64M as it will also be
  188. # used for internal temporary disk tables.
  189. key_buffer_size=8M
  190.  
  191. # Size of the buffer used for doing full table scans of MyISAM tables.
  192. # Allocated per thread, if a full scan is needed.
  193. read_buffer_size=64K
  194. read_rnd_buffer_size=256K
  195.  
  196. #*** INNODB Specific options ***
  197. # innodb_data_home_dir=0.0
  198.  
  199. # Use this option if you have a MySQL server with InnoDB support enabled
  200. # but you do not plan to use it. This will save memory and disk space
  201. # and speed up some things.
  202. # skip-innodb
  203.  
  204. # Additional memory pool that is used by InnoDB to store metadata
  205. # information. If InnoDB requires more memory for this purpose it will
  206. # start to allocate it from the OS. As this is fast enough on most
  207. # recent operating systems, you normally do not need to change this
  208. # value. SHOW INNODB STATUS will display the current amount used.
  209. innodb_additional_mem_pool_size=32M
  210.  
  211. # If set to 1, InnoDB will flush (fsync) the transaction logs to the
  212. # disk at each commit, which offers full ACID behavior. If you are
  213. # willing to compromise this safety, and you are running small
  214. # transactions, you may set this to 0 or 2 to reduce disk I/O to the
  215. # logs. Value 0 means that the log is only written to the log file and
  216. # the log file flushed to disk approximately once per second. Value 2
  217. # means the log is written to the log file at each commit, but the log
  218. # file is only flushed to disk approximately once per second.
  219. innodb_flush_log_at_trx_commit=1
  220.  
  221. # The size of the buffer InnoDB uses for buffering log data. As soon as
  222. # it is full, InnoDB will have to flush it to disk. As it is flushed
  223. # once per second anyway, it does not make sense to have it very large
  224. # (even with long transactions).
  225. innodb_log_buffer_size=16M
  226.  
  227. # InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
  228. # row data. The bigger you set this the less disk I/O is needed to
  229. # access data in tables. On a dedicated database server you may set this
  230. # parameter up to 80% of the machine physical memory size. Do not set it
  231. # too large, though, because competition of the physical memory may
  232. # cause paging in the operating system. Note that on 32bit systems you
  233. # might be limited to 2-3.5G of user level memory per process, so do not
  234. # set it too high.
  235. #innodb_buffer_pool_size=7G
  236. innodb_buffer_pool_size=20G
  237.  
  238. # Size of each log file in a log group. You should set the combined size
  239. # of log files to about 25%-100% of your buffer pool size to avoid
  240. # unneeded buffer pool flush activity on log file overwrite. However,
  241. # note that a larger logfile size will increase the time needed for the
  242. # recovery process.
  243. #innodb_log_file_size=2G
  244. innodb_log_file_size=4G
  245.  
  246. # Number of threads allowed inside the InnoDB kernel. The optimal value
  247. # depends highly on the application, hardware as well as the OS
  248. # scheduler properties. A too high value may lead to thread thrashing.
  249. #innodb_thread_concurrency=17
  250. innodb_thread_concurrency=0
  251.  
  252. # The increment size (in MB) for extendi1024ng the size of an auto-extend InnoDB system
  253.  
  254. tablespace file when it becomes full.
  255. innodb_autoextend_increment=64
  256.  
  257. # The number of regions that the InnoDB buffer pool is divided into.
  258. # For systems with buffer pools in the multi-gigabyte range, dividing the buffer pool into
  259.  
  260. separate instances can improve concurrency,
  261. # by reducing contention as different threads read and write to cached pages.
  262. #innodb_buffer_pool_instances=8
  263. innodb_buffer_pool_instances=20
  264.  
  265. # Determines the number of threads that can enter InnoDB concurrently.
  266. innodb_concurrency_tickets=5000
  267.  
  268. # Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay
  269.  
  270. there after its first access before
  271. # it can be moved to the new sublist.
  272. innodb_old_blocks_time=1000
  273.  
  274. # It specifies the maximum number of .ibd files that MySQL can keep open at one time. The
  275.  
  276. minimum value is 10.
  277. innodb_open_files=300
  278.  
  279. # When this variable is enabled, InnoDB updates statistics during metadata statements.
  280. innodb_stats_on_metadata=0
  281.  
  282. # When innodb_file_per_table is enabled (the default in 5.6.6 and higher), InnoDB stores
  283.  
  284. the data and indexes for each newly created table
  285. # in a separate .ibd file, rather than in the system tablespace.
  286. innodb_file_per_table=1
  287.  
  288. # Use the following list of values: 0 for crc32, 1 for strict_crc32, 2 for innodb, 3 for
  289.  
  290. strict_innodb, 4 for none, 5 for strict_none.
  291. innodb_checksum_algorithm=0
  292.  
  293. # The number of outstanding connection requests MySQL can have.
  294. # This option is useful when the main MySQL thread gets many connection requests in a very
  295.  
  296. short time.
  297. # It then takes some time (although very little) for the main thread to check the
  298.  
  299. connection and start a new thread.
  300. # The back_log value indicates how many requests can be stacked during this short time
  301.  
  302. before MySQL momentarily
  303. # stops answering new requests.
  304. # You need to increase this only if you expect a large number of connections in a short
  305.  
  306. period of time.
  307. back_log=80
  308.  
  309. # If this is set to a nonzero value, all tables are closed every flush_time seconds to
  310.  
  311. free up resources and
  312. # synchronize unflushed data to disk.
  313. # This option is best used only on systems with minimal resources.
  314. flush_time=0
  315.  
  316. # The minimum size of the buffer that is used for plain index scans, range index scans,
  317.  
  318. and joins that do not use
  319. # indexes and thus perform full table scans.
  320. join_buffer_size=256K
  321.  
  322. # The maximum size of one packet or any generated or intermediate string, or any parameter
  323.  
  324. sent by the
  325. # mysql_stmt_send_long_data() C API function.
  326. max_allowed_packet=256M
  327.  
  328. # If more than this many successive connection requests from a host are interrupted
  329.  
  330. without a successful connection,
  331. # the server blocks that host from performing further connections.
  332. max_connect_errors=100
  333.  
  334. # Changes the number of file descriptors available to mysqld.
  335. # You should try increasing the value of this option if mysqld gives you the error "Too
  336.  
  337. many open files".
  338. open_files_limit=4161
  339.  
  340. # Set the query cache type. 0 for OFF, 1 for ON and 2 for DEMAND.
  341. query_cache_type=1
  342.  
  343. # If you see many sort_merge_passes per second in SHOW GLOBAL STATUS output, you can
  344.  
  345. consider increasing the
  346. # sort_buffer_size value to speed up ORDER BY or GROUP BY operations that cannot be
  347.  
  348. improved with query optimization
  349. # or improved indexing.
  350. sort_buffer_size=256K
  351.  
  352. # The number of table definitions (from .frm files) that can be stored in the definition
  353.  
  354. cache.
  355. # If you use a large number of tables, you can create a large table definition cache to
  356.  
  357. speed up opening of tables.
  358. # The table definition cache takes less space and does not use file descriptors, unlike
  359.  
  360. the normal table cache.
  361. # The minimum and default values are both 400.
  362. table_definition_cache=1400
  363.  
  364. # Specify the maximum size of a row-based binary log event, in bytes.
  365. # Rows are grouped into events smaller than this size if possible. The value should be a
  366.  
  367. multiple of 256.
  368. binlog_row_event_max_size=8K
  369.  
  370. # If the value of this variable is greater than 0, a replication slave synchronizes its
  371.  
  372. master.info file to disk.
  373. # (using fdatasync()) after every sync_master_info events.
  374. sync_master_info=10000
  375.  
  376. # If the value of this variable is greater than 0, the MySQL server synchronizes its relay
  377.  
  378. log to disk.
  379. # (using fdatasync()) after every sync_relay_log writes to the relay log.
  380. sync_relay_log=10000
  381.  
  382. # If the value of this variable is greater than 0, a replication slave synchronizes its
  383.  
  384. relay-log.info file to disk.
  385. # (using fdatasync()) after every sync_relay_log_info transactions.
  386. sync_relay_log_info=10000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement