mysql.cnf 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # 此文件只给 docker 开发套件。165(123.60.180.165)的生效文件是 /etc/my.cnf,
  2. # 禁止把本文件 scp 上去覆盖现场——现场还跑着 Gogs / SQL Server / 旧 Business,
  3. # 且本文件的 max_connections=1000、无缓冲池显式值,与现场护栏(4G / 500)不一致。
  4. [client]
  5. default-character-set=utf8
  6. [mysqld]
  7. character-set-server=utf8
  8. log-bin=mysql-bin
  9. server-id=1
  10. pid-file = /var/run/mysqld/mysqld.pid
  11. socket = /var/run/mysqld/mysqld.sock
  12. datadir = /var/lib/mysql
  13. sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  14. symbolic-links=0
  15. secure_file_priv =
  16. wait_timeout=86400
  17. interactive_timeout=86400
  18. default-time_zone = '+8:00'
  19. skip-external-locking
  20. skip-name-resolve
  21. open_files_limit = 10240
  22. max_connections = 1000
  23. max_connect_errors = 6000
  24. table_open_cache = 800
  25. max_allowed_packet = 40m
  26. sort_buffer_size = 2M
  27. join_buffer_size = 1M
  28. thread_cache_size = 32
  29. query_cache_size = 64M
  30. transaction_isolation = READ-COMMITTED
  31. tmp_table_size = 128M
  32. max_heap_table_size = 128M
  33. log-bin = mysql-bin
  34. sync-binlog = 1
  35. binlog_format = ROW
  36. binlog_cache_size = 1M
  37. key_buffer_size = 128M
  38. read_buffer_size = 2M
  39. read_rnd_buffer_size = 4M
  40. bulk_insert_buffer_size = 64M
  41. lower_case_table_names = 1
  42. explicit_defaults_for_timestamp=true
  43. skip_name_resolve = ON
  44. event_scheduler = ON
  45. log_bin_trust_function_creators = 1
  46. innodb_buffer_pool_size = 512M
  47. innodb_flush_log_at_trx_commit = 1
  48. innodb_file_per_table = 1
  49. innodb_log_buffer_size = 4M
  50. innodb_log_file_size = 256M
  51. innodb_max_dirty_pages_pct = 90
  52. innodb_read_io_threads = 4
  53. innodb_write_io_threads = 4