Advertisement
Guest User

mysql

a guest
Feb 18th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. [client]
  2. socket=/var/lib/mysql/mysql.sock
  3.  
  4. [mysqld]
  5. local-infile=0
  6. ignore-db-dir=lost+found
  7. character-set-server=utf8
  8. datadir=/var/lib/mysql
  9. socket=/var/lib/mysql/mysql.sock
  10.  
  11. bind-address=0.0.0.0
  12. sql-mode=""
  13. port=56731
  14. # optimized my.cnf for MariaDB 5.5.x
  15. # by eva2000
  16. # vbtechsupport.com
  17. skip-name-resolve=1
  18.  
  19. # InnoDB Settings
  20. default_storage_engine = InnoDB
  21. innodb_buffer_pool_instances = 4 # Use 1 instance per 1GB of InnoDB pool size
  22. innodb_buffer_pool_size = 4G # Use up to 70-80% of RAM & optionally check if /proc/sys/vm/swappiness is set to 0
  23. innodb_file_per_table = 1
  24. innodb_flush_log_at_trx_commit = 0
  25. innodb_flush_method = O_DIRECT
  26. innodb_log_buffer_size = 16M
  27. innodb_log_file_size = 512M
  28. innodb_stats_on_metadata = 0
  29. innodb_file_per_table=1
  30.  
  31.  
  32. innodb_temp_data_file_path = ibtmp1:64M:autoextend:max:20G # Control the maximum size for the ibtmp1 file
  33. innodb_thread_concurrency = 1 # Optional: Set to the number of CPUs on your system (minus 1 or 2) to better
  34. # contain CPU usage. E.g. if your system has 8 CPUs, try 6 or 7 and check
  35. # the overall load produced by MySQL/MariaDB.
  36. innodb_read_io_threads = 64
  37. innodb_write_io_threads = 64
  38.  
  39. # MyISAM Settings
  40. query_cache_limit = 256k # UPD
  41. query_cache_size = 0 # UPD
  42. query_cache_min_res_unit = 2k
  43. query_cache_type = 0
  44. performance_schema = ON
  45. key_buffer_size = 5M # UPD
  46.  
  47. low_priority_updates = 1
  48. concurrent_insert = 2
  49.  
  50. # Connection Settings
  51. max_connections = 700 # UPD
  52.  
  53. back_log = 512
  54. thread_cache_size = 96
  55. thread_stack = 192K
  56.  
  57. interactive_timeout = 180
  58. wait_timeout = 180
  59.  
  60. # Buffer Settings
  61. join_buffer_size = 512k # UPD
  62. read_buffer_size = 512k # UPD
  63. read_rnd_buffer_size = 1024k # UPD
  64. sort_buffer_size = 8M # UPD
  65.  
  66. # Table Settings
  67. # In systemd managed systems like Ubuntu 16.04 or CentOS 7, you need to perform an extra action for table_open_cache & open_files_limit
  68. # to be overriden (also see comment next to open_files_limit).
  69. # E.g. for MySQL 5.7, please check: https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html
  70. # and for MariaDB check: https://mariadb.com/kb/en/library/systemd/
  71. table_definition_cache = 10000 # UPD
  72. table_open_cache = 10000 # UPD
  73. open_files_limit = 60000 # UPD - This can be 2x to 3x the table_open_cache value or match the system's
  74. # open files limit usually set in /etc/sysctl.conf or /etc/security/limits.conf
  75. # In systemd managed systems this limit must also be set in:
  76. # /etc/systemd/system/mysqld.service.d/override.conf (for MySQL 5.7+) and
  77. # /etc/systemd/system/mariadb.service.d/override.conf (for MariaDB)
  78.  
  79. max_heap_table_size = 256M
  80. tmp_table_size = 256M
  81. table_cache = 2000
  82.  
  83. # Search Settings
  84. ft_min_word_len = 3 # Minimum length of words to be indexed for search results
  85.  
  86. # Logging
  87. #log_error = /var/lib/mysql/mysql_error.log
  88. #log_queries_not_using_indexes = 1
  89. #long_query_time = 5
  90. #slow_query_log = 0 # Disabled for production
  91. #slow_query_log_file = /var/lib/mysql/mysql_slow.log
  92.  
  93. [mysqldump]
  94. # Variable reference
  95. # For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html
  96. # For MariaDB: https://mariadb.com/kb/en/library/mysqldump/
  97. quick
  98. quote_names
  99. max_allowed_packet = 256M
  100. thread_concurrency=30 # from 10 to allow more concurrency
  101. expire_logs_days=5 # from 0 for limited historical logs
  102. key_cache_age_threshold=64800 # from 300 seconds discard to RD again
  103. key_cache_division_limit=50 # for HOT and WARM usage boundary
  104. key_cache_block_size=16384 # from 1024 to age out larger size
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement