Advertisement
thanh_thu

mysql_config

Jul 31st, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. Bùi Mạnh, [01.08.19 10:21]
  2. [mysqld]
  3. user = mysql
  4. bind_address = 127.0.0.1
  5. datadir = /var/lib/mysql
  6. socket = /var/lib/mysql/mysql.sock
  7. port = 3306
  8. skip_name_resolve = 1
  9. max_allowed_packet = 32M
  10. open_files_limit = 10240
  11.  
  12. ###Max_Connection###
  13. max_user_connections = 10
  14.  
  15. ### innodb ###
  16. default_storage_engine = InnoDB
  17. innodb_autoinc_lock_mode = 2
  18. innodb_doublewrite = 1
  19. innodb_flush_log_at_trx_commit = 1
  20. innodb_buffer_pool_size = 1536M
  21. innodb_buffer_pool_instances = 1
  22. innodb_file_per_table = 1
  23. innodb_flush_method = O_DIRECT
  24. innodb_log_buffer_size = 8M
  25.  
  26. ### query cache ###
  27. query_cache_size = 512M
  28. query_cache_type = 1
  29. query_cache_limit = 3M
  30.  
  31. ### timeout ###
  32. wait_timeout = 30
  33. interactive_timeout = 30
  34. connect_timeout = 30
  35.  
  36. ### Redo log
  37. innodb_log_files_in_group = 2
  38. innodb_log_file_size = 12M
  39.  
  40. ### temporary tables ###
  41. tmp_table_size = 128M
  42. max_heap_table_size = 128M
  43. tmpdir = /var/log/mysql/tmp
  44.  
  45. ### thread pool ###
  46. # I do not use thread pool
  47.  
  48. ### thread cache ###
  49. thread_cache_size = 2
  50. max_connections = 200
  51.  
  52. ### log ###
  53. log_output = FILE
  54. log_error = /var/log/mysql/mysql_error.log
  55. slow_query_log = 1
  56. log_queries_not_using_indexes = 0
  57. log_warnings = 2
  58. long_query_time = 2
  59. slow_query_log_file = /var/log/mysql/mysql_slow.log
  60. general_log = 0
  61. general_log_file = /var/log/mysql/mysql_general.log
  62.  
  63. [mysqld_safe]
  64. log-error=/var/log/mysql/mysqld.log
  65. #pid-file=/var/run/mysql/mysqld.pid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement