PUSDN - JaneYork
    https://www.pusdn.com

    1. [client]
    2. #password = your_password
    3. port = 3306
    4. socket = /tmp/mysql.sock
    5. [mysqld]
    6. port = 3306
    7. socket = /tmp/mysql.sock
    8. datadir = /www/server/data
    9. default_storage_engine = InnoDB
    10. performance_schema_max_table_instances = 400
    11. table_definition_cache = 400
    12. skip-external-locking
    13. key_buffer_size = 8M
    14. max_allowed_packet = 100G
    15. table_open_cache = 32
    16. sort_buffer_size = 256K
    17. net_buffer_length = 4K
    18. read_buffer_size = 128K
    19. read_rnd_buffer_size = 256K
    20. myisam_sort_buffer_size = 4M
    21. thread_cache_size = 4
    22. query_cache_size = 4M
    23. tmp_table_size = 8M
    24. sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    25. explicit_defaults_for_timestamp = true
    26. #skip-name-resolve
    27. max_connections = 500
    28. max_connect_errors = 100
    29. open_files_limit = 65535
    30. log-bin=mysql-bin
    31. binlog_format=mixed
    32. server-id = 1
    33. expire_logs_days = 10
    34. slow_query_log=1
    35. slow-query-log-file=/www/server/data/mysql-slow.log
    36. long_query_time=3
    37. #log_queries_not_using_indexes=on
    38. innodb_data_home_dir = /www/server/data
    39. innodb_data_file_path = ibdata1:10M:autoextend
    40. innodb_log_group_home_dir = /www/server/data
    41. innodb_buffer_pool_size = 16M
    42. innodb_log_file_size = 5M
    43. innodb_log_buffer_size = 8M
    44. innodb_flush_log_at_trx_commit = 1
    45. innodb_lock_wait_timeout = 50
    46. innodb_max_dirty_pages_pct = 90
    47. innodb_read_io_threads = 1
    48. innodb_write_io_threads = 1
    49. [mysqldump]
    50. quick
    51. max_allowed_packet = 500M
    52. [mysql]
    53. no-auto-rehash
    54. [myisamchk]
    55. key_buffer_size = 20M
    56. sort_buffer_size = 20M
    57. read_buffer = 2M
    58. write_buffer = 2M
    59. [mysqlhotcopy]
    60. interactive-timeout

    配置二:(用于比对)

    1. [client]
    2. #password = your_password
    3. port = 3306
    4. socket = /tmp/mysql.sock
    5. [mysqld]
    6. binlog_cache_size = 64K
    7. thread_stack = 256K
    8. join_buffer_size = 1024K
    9. query_cache_type = 1
    10. max_heap_table_size = 64M
    11. port = 3306
    12. socket = /tmp/mysql.sock
    13. datadir = /www/server/data
    14. default_storage_engine = InnoDB
    15. performance_schema_max_table_instances = 400
    16. table_definition_cache = 400
    17. skip-external-locking
    18. key_buffer_size = 128M
    19. max_allowed_packet = 100G
    20. table_open_cache = 128
    21. sort_buffer_size = 768K
    22. net_buffer_length = 4K
    23. read_buffer_size = 768K
    24. read_rnd_buffer_size = 512K
    25. myisam_sort_buffer_size = 4M
    26. thread_cache_size = 64
    27. query_cache_size = 64M
    28. tmp_table_size = 64M
    29. sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
    30. explicit_defaults_for_timestamp = true
    31. #skip-name-resolve
    32. max_connections = 100
    33. max_connect_errors = 100
    34. open_files_limit = 65535
    35. log-bin=mysql-bin
    36. binlog_format=mixed
    37. server-id = 1
    38. expire_logs_days = 10
    39. slow_query_log=1
    40. slow-query-log-file=/www/server/data/mysql-slow.log
    41. long_query_time=3
    42. #log_queries_not_using_indexes=on
    43. innodb_data_home_dir = /www/server/data
    44. innodb_data_file_path = ibdata1:10M:autoextend
    45. innodb_log_group_home_dir = /www/server/data
    46. innodb_buffer_pool_size = 256M
    47. innodb_log_file_size = 5M
    48. innodb_log_buffer_size = 8M
    49. innodb_flush_log_at_trx_commit = 1
    50. innodb_lock_wait_timeout = 50
    51. innodb_max_dirty_pages_pct = 90
    52. innodb_read_io_threads = 1
    53. innodb_write_io_threads = 1
    54. [mysqldump]
    55. quick
    56. max_allowed_packet = 500M
    57. [mysql]
    58. no-auto-rehash
    59. [myisamchk]
    60. key_buffer_size = 20M
    61. sort_buffer_size = 20M
    62. read_buffer = 2M
    63. write_buffer = 2M
    64. [mysqlhotcopy]
    65. interactive-timeout

    部分截图如下:
    image.png
    image.png
    image.png
    image.png
    image.png