my.cnf 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #######################
  2. # client #
  3. #######################
  4. [client]
  5. port = 3306
  6. socket = /var/run/mysqld/mysqld.sock
  7. default-character-set=utf8
  8. #######################
  9. # mysqld #
  10. #######################
  11. [mysqld]
  12. #
  13. # * Basic Settings
  14. #
  15. default-storage-engine = innodb
  16. default_authentication_plugin = mysql_native_password
  17. user = mysql
  18. pid-file = /var/run/mysqld/mysqld.pid
  19. socket = /var/run/mysqld/mysqld.sock
  20. datadir = /ssd
  21. secure-file-priv= NULL
  22. port = 3306
  23. skip-external-locking
  24. skip-name-resolve
  25. lower_case_table_names = 1
  26. character-set-server=utf8
  27. collation-server=utf8_general_ci
  28. #
  29. # * Fine Tuning
  30. #
  31. key_buffer_size = 16M
  32. max_allowed_packet = 16M
  33. thread_stack = 256K
  34. thread_cache_size = 128
  35. max_connections = 5000
  36. back_log = 5000
  37. table_open_cache = 800
  38. table_definition_cache = 800
  39. max_heap_table_size = 128M
  40. tmp_table_size = 128M
  41. #
  42. # monitoring off
  43. #
  44. performance-schema = false
  45. #
  46. # innodb settings
  47. #
  48. innodb_use_native_aio = 1
  49. # sync for every sec. not for every commit.
  50. innodb_flush_log_at_trx_commit = 2
  51. innodb_flush_method=O_DIRECT
  52. innodb_buffer_pool_instances=14
  53. sync_binlog=0
  54. #
  55. # * Query Cache Configuration
  56. max_prepared_stmt_count = 1048576
  57. #######################
  58. # mysqldump #
  59. #######################
  60. [mysqldump]
  61. quick
  62. quote-names
  63. max_allowed_packet = 16M
  64. !includedir /etc/mysql/conf.d/