Skip to content

Commit

Permalink
2016-04-29完善MySQL配置
Browse files Browse the repository at this point in the history
  • Loading branch information
judasn committed Apr 29, 2016
1 parent cd2e967 commit 0caee72
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,11 @@ innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_additional_mem_pool_size = 2M
innodb_flush_method = O_DIRECT
bulk_insert_buffer_size = 8M
# 用于设置在 REPAIR TABLE 和 CREATE INDEX 创建索引或 ALTER TABLE 的过程中排序索引所分配的缓冲区大小,可设置范围:4MB~4GB,默认8MB,4G内存的服务器可以设置为32M~64M
myisam_sort_buffer_size = 8M
# 32位系统默认值是2147483648=2G,64位系统,默认值是9223372036854775807,单位是bytes.
myisam_max_sort_file_size = 2147483648
myisam_max_sort_file_size = 100G
myisam_repair_threads = 1

# 服务器关闭交互式连接前等待活动的秒数。单位秒
Expand Down
3 changes: 1 addition & 2 deletions MySQL-Settings/MySQL-5.6/1G-Memory-Machine/my-for-master.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,11 @@ innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_additional_mem_pool_size = 2M
innodb_flush_method = O_DIRECT
bulk_insert_buffer_size = 8M
# 用于设置在 REPAIR TABLE 和 CREATE INDEX 创建索引或 ALTER TABLE 的过程中排序索引所分配的缓冲区大小,可设置范围:4MB~4GB,默认8MB,4G内存的服务器可以设置为32M~64M
myisam_sort_buffer_size = 8M
# 32位系统默认值是2147483648=2G,64位系统,默认值是9223372036854775807,单位是bytes.
myisam_max_sort_file_size = 2147483648
myisam_max_sort_file_size = 100G
myisam_repair_threads = 1

# 服务器关闭交互式连接前等待活动的秒数。单位秒
Expand Down
3 changes: 1 addition & 2 deletions MySQL-Settings/MySQL-5.6/1G-Memory-Machine/my-for-salve.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,11 @@ innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_additional_mem_pool_size = 2M
innodb_flush_method = O_DIRECT
bulk_insert_buffer_size = 8M
# 用于设置在 REPAIR TABLE 和 CREATE INDEX 创建索引或 ALTER TABLE 的过程中排序索引所分配的缓冲区大小,可设置范围:4MB~4GB,默认8MB,4G内存的服务器可以设置为32M~64M
myisam_sort_buffer_size = 8M
# 32位系统默认值是2147483648=2G,64位系统,默认值是9223372036854775807,单位是bytes.
myisam_max_sort_file_size = 2147483648
myisam_max_sort_file_size = 100G
myisam_repair_threads = 1

# 服务器关闭交互式连接前等待活动的秒数。单位秒
Expand Down
76 changes: 76 additions & 0 deletions MySQL-Settings/MySQL-5.6/developer/my-Windows-8G-开发机.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
[client]
no-beep
port=3306


[mysql]
default-character-set=utf8

[mysqld]
port=3306
basedir="C:/Program Files/MySQL/MySQL Server 5.6/"
datadir="C:/ProgramData/MySQL/MySQL Server 5.6/data\"
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
log-output=NONE
general-log=0
general_log_file="AJBC-1540.log"
slow-query-log=0
slow_query_log_file="AJBC-1540-slow.log"
long_query_time=10
log-error="AJBC-1540.err"
max_connections=1000
query_cache_size=10M
table_open_cache=2000
tmp_table_size=37M
thread_cache_size=32
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=72M
key_buffer_size=256M
read_buffer_size=6M
read_rnd_buffer_size=8M
sort_buffer_size=2M
innodb_additional_mem_pool_size=5M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=3M
innodb_buffer_pool_size=592M
innodb_log_file_size=64M
innodb_thread_concurrency=9
innodb_autoextend_increment=64M
innodb_buffer_pool_instances=8
innodb_concurrency_tickets=5000
innodb_old_blocks_time=1000
innodb_open_files=500
innodb_stats_on_metadata=0
innodb_file_per_table=1
innodb_checksum_algorithm=0
back_log=512
flush_time=0
join_buffer_size=4M
max_allowed_packet=50M
max_connect_errors=1000000
open_files_limit=65535
query_cache_type=1
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_purge_threads = 1
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
max_heap_table_size = 32M
thread_stack = 256k
ft_min_word_len = 4
performance_schema = 0
explicit_defaults_for_timestamp = true
skip_external_locking
bulk_insert_buffer_size = 8M
wait_timeout = 3600
interactive_timeout = 28800
myisam_repair_threads = 1
query_cache_limit = 5M

0 comments on commit 0caee72

Please sign in to comment.