Advertisement
Guest User

Mysql Timeouts when making big querries from a remote host

a guest
Feb 17th, 2019
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.09 KB | None | 0 0
  1. ; Example MySQL config file for medium systems.
  2. ;
  3. ; This is for a large system with memory of 1G-2G where the system runs mainly
  4. ; MySQL.
  5. ;
  6. ; MySQL programs look for option files in a set of
  7. ; locations which depend on the deployment platform.
  8. ; You can copy this option file to one of those
  9. ; locations. For information about these locations, see:
  10. ; http://dev.mysql.com/doc/mysql/en/option-files.html
  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. [wampmysqld64]
  26. ;skip-grant-tables
  27. default_authentication_plugin=mysql_native_password
  28. port = 3306
  29. socket = /tmp/mysql.sock
  30. key_buffer_size = 256M
  31. max_allowed_packet = 100M
  32.  
  33. ;Added to reduce memory used (minimum is 400)
  34. table_definition_cache = 600
  35.  
  36. sort_buffer_size = 10M
  37. ;net_buffer_length = 8K
  38. net_buffer_length = 1000000
  39. read_buffer_size = 10M
  40. read_rnd_buffer_size = 10M
  41. myisam_sort_buffer_size = 64M
  42. ;Path to mysql install directory
  43. basedir="c:/wamp64/bin/mysql/mysql5.7.24"
  44. log-error="c:/wamp64/logs/mysql.log"
  45. ;Verbosity Value 1 Errors only, 2 Errors and warnings , 3 Errors, warnings, and notes
  46. log_error_verbosity=2
  47. ;Path to data directory
  48. datadir="c:/wamp64/bin/mysql/mysql5.7.24/data"
  49.  
  50. ;Path to the language
  51. ;See Documentation:
  52. ; http://dev.mysql.com/doc/refman/5.7/en/error-message-language.html
  53. lc-messages-dir="c:/wamp64/bin/mysql/mysql5.7.24/share"
  54. lc-messages=en_US
  55.  
  56. ; The default storage engine that will be used when create new tables
  57. default-storage-engine=MYISAM
  58. ; New for MySQL 5.6 default_tmp_storage_engine if skip-innodb enable
  59. ; default_tmp_storage_engine=MYISAM
  60.  
  61. ;To avoid warning messages
  62. secure_file_priv="c:/wamp64/tmp"
  63. skip-ssl
  64.  
  65. explicit_defaults_for_timestamp=true
  66.  
  67. ; Set the SQL mode to strict
  68. ;sql-mode=""
  69. sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"
  70.  
  71. ; Don't listen on a TCP/IP port at all. This can be a security enhancement,
  72. ; if all processes that need to connect to mysqld run on the same host.
  73. ; All interaction with mysqld must be made via Unix sockets or named pipes.
  74. ; Note that using this option without enabling named pipes on Windows
  75. ; (via the "enable-named-pipe" option) will render mysqld useless!
  76. ;
  77. ;skip-networking
  78.  
  79. ; Disable Federated by default
  80. skip-federated
  81.  
  82. ; Replication Master Server (default)
  83. ; binary logging is required for replication
  84. ;log-bin=mysql-bin
  85.  
  86. ; binary logging format - mixed recommended
  87. ;binlog_format=mixed
  88.  
  89. ; required unique id between 1 and 2^32 - 1
  90. ; defaults to 1 if master-host is not set
  91. ; but will not function as a master if omitted
  92. server-id = 1
  93.  
  94. ; Replication Slave (comment out master section to use this)
  95.  
  96. ; New for MySQL 5.6 if no slave
  97. skip-slave-start
  98.  
  99. ;
  100. ; To configure this host as a replication slave, you can choose between
  101. ; two methods :
  102. ;
  103. ; 1) Use the CHANGE MASTER TO command (fully described in our manual) -
  104. ; the syntax is:
  105. ;
  106. ; CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
  107. ; MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
  108. ;
  109. ; where you replace <host>, <user>, <password> by quoted strings and
  110. ; <port> by the master's port number (3306 by default).
  111. ;
  112. ; Example:
  113. ;
  114. ; CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
  115. ; MASTER_USER='joe', MASTER_PASSWORD='secret';
  116. ;
  117. ; OR
  118. ;
  119. ; 2) Set the variables below. However, in case you choose this method, then
  120. ; start replication for the first time (even unsuccessfully, for example
  121. ; if you mistyped the password in master-password and the slave fails to
  122. ; connect), the slave will create a master.info file, and any later
  123. ; change in this file to the variables' values below will be ignored and
  124. ; overridden by the content of the master.info file, unless you shutdown
  125. ; the slave server, delete master.info and restart the slaver server.
  126. ; For that reason, you may want to leave the lines below untouched
  127. ; (commented) and instead use CHANGE MASTER TO (see above)
  128. ;
  129. ; required unique id between 2 and 2^32 - 1
  130. ; (and different from the master)
  131. ; defaults to 2 if master-host is set
  132. ; but will not function as a slave if omitted
  133. ;server-id = 2
  134. ;
  135. ; The replication master for this slave - required
  136. ;master-host = <hostname>
  137. ;
  138. ; The username the slave will use for authentication when connecting
  139. ; to the master - required
  140. ;master-user = <username>
  141. ;
  142. ; The password the slave will authenticate with when connecting to
  143. ; the master - required
  144. ;master-password = <password>
  145. ;
  146. ; The port the master is listening on.
  147. ; optional - defaults to 3306
  148. ;master-port = <port>
  149. ;
  150. ; binary logging - not required for slaves, but recommended
  151. ;log-bin=mysql-bin
  152.  
  153. ; Point the following paths to different dedicated disks
  154. ;tmpdir = /tmp/
  155. ;log-update = /path-to-dedicated-directory/hostname
  156.  
  157. ; The InnoDB tablespace encryption feature relies on the keyring_file
  158. ; plugin for encryption key management, and the keyring_file plugin
  159. ; must be loaded prior to storage engine initialization to facilitate
  160. ; InnoDB recovery for encrypted tables. If you do not want to load the
  161. ; keyring_file plugin at server startup, specify an empty string.
  162. early-plugin-load=""
  163.  
  164. ;innodb_data_home_dir = C:/mysql/data/
  165. innodb_data_file_path = ibdata1:12M:autoextend
  166. ;innodb_log_group_home_dir = C:/mysql/data/
  167. ;innodb_log_arch_dir = C:/mysql/data/
  168. ; You can set .._buffer_pool_size up to 50 - 80 %
  169. ; of RAM but beware of setting memory usage too high
  170. innodb_buffer_pool_size = 256M
  171. ; Set .._log_file_size to 25 % of buffer pool size
  172. innodb_log_file_size = 256M
  173. innodb_log_buffer_size = 8M
  174. innodb_flush_log_at_trx_commit = 1
  175. innodb_lock_wait_timeout = 50
  176. innodb_flush_method=normal
  177.  
  178.  
  179. [mysqldump]
  180. quick
  181. max_allowed_packet = 100M
  182.  
  183. [mysql]
  184. no-auto-rehash
  185. max_allowed_packet = 100M
  186. ; Remove the next comment character if you are not familiar with SQL
  187. ;safe-updates
  188.  
  189. [isamchk]
  190. key_buffer_size = 40M
  191. sort_buffer_size = 40M
  192. read_buffer_size = 10M
  193. write_buffer_size = 10M
  194.  
  195. [myisamchk]
  196. key_buffer_size = 40M
  197. sort_buffer_size_size = 40M
  198. read_buffer_size = 20M
  199. write_buffer_size = 20M
  200.  
  201. [mysqlhotcopy]
  202. wait_timeout = 28800
  203. interactive_timeout = 28800
  204.  
  205. [mysqld]
  206. default_authentication_plugin=mysql_native_password
  207. port = 3306
  208. ;bind-address = 127.0.0.1
  209.  
  210. query_cache_limit = 10M
  211. query_cache_size = 24M
  212.  
  213. max_connections = 1000
  214. max_allowed_packet = 100M
  215.  
  216. slow-query-log = 1
  217.  
  218. key_buffer_size = 500M
  219. read_buffer_size = 50M
  220. read_rnd_buffer_size = 50M
  221. sort_buffer_size = 50M
  222. tmp_table_size = 50M
  223. join_buffer_size = 50M
  224. max_heap_table_size = 50M
  225. #skip_innodb
  226.  
  227. # parameters added for thread cache size, wait time out, interactive timeout and table open cache
  228. wait_timeout = 28800
  229. interactive_timeout = 28800
  230. net_read_timeout = 28800
  231. net_write_timeout = 28800
  232. table_open_cache = 8000
  233. thread_cache_size = 1000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement