Advertisement
Guest User

Untitled

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