mysql.cnf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [client]
  2. default-character-set=utf8
  3. [mysqld]
  4. character-set-server=utf8
  5. log-bin=mysql-bin
  6. server-id=1
  7. pid-file = /var/run/mysqld/mysqld.pid
  8. socket = /var/run/mysqld/mysqld.sock
  9. datadir = /var/lib/mysql
  10. sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  11. symbolic-links=0
  12. secure_file_priv =
  13. wait_timeout=86400
  14. interactive_timeout=86400
  15. default-time_zone = '+8:00'
  16. skip-external-locking
  17. skip-name-resolve
  18. open_files_limit = 10240
  19. max_connections = 1000
  20. max_connect_errors = 6000
  21. table_open_cache = 800
  22. max_allowed_packet = 40m
  23. sort_buffer_size = 2M
  24. join_buffer_size = 1M
  25. thread_cache_size = 32
  26. query_cache_size = 64M
  27. transaction_isolation = READ-COMMITTED
  28. tmp_table_size = 128M
  29. max_heap_table_size = 128M
  30. log-bin = mysql-bin
  31. sync-binlog = 1
  32. binlog_format = ROW
  33. binlog_cache_size = 1M
  34. key_buffer_size = 128M
  35. read_buffer_size = 2M
  36. read_rnd_buffer_size = 4M
  37. bulk_insert_buffer_size = 64M
  38. lower_case_table_names = 1
  39. explicit_defaults_for_timestamp=true
  40. skip_name_resolve = ON
  41. event_scheduler = ON
  42. log_bin_trust_function_creators = 1
  43. innodb_buffer_pool_size = 512M
  44. innodb_flush_log_at_trx_commit = 1
  45. innodb_file_per_table = 1
  46. innodb_log_buffer_size = 4M
  47. innodb_log_file_size = 256M
  48. innodb_max_dirty_pages_pct = 90
  49. innodb_read_io_threads = 4
  50. innodb_write_io_threads = 4