本站文章总数为:165
Search Posts

备份mysqld优化配置

内容纲要
vim /etc/my.cnf
innodb_buffer_pool_size = 4096M
innodb_log_file_size = 2048M
innodb_log_buffer_size = 1024M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_max_dirty_pages_pct = 90
innodb_read_io_threads = 8
innodb_write_io_threads = 8

default_storage_engine = InnoDB
performance_schema_max_table_instances = 400
table_definition_cache = 400
skip-external-locking
key_buffer_size = 1024M
max_allowed_packet = 100G
table_open_cache = 2048
sort_buffer_size = 4096K
net_buffer_length = 4K
read_buffer_size = 4096K
read_rnd_buffer_size = 2048K
myisam_sort_buffer_size = 16M
thread_cache_size = 256
query_cache_size = 384M
tmp_table_size = 2048M
sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

thread_stack = 512K
join_buffer_size = 8192K
query_cache_type = 1
max_heap_table_size = 2048M

explicit_defaults_for_timestamp = true
skip-name-resolve
max_connections = 500
max_connect_errors = 100
open_files_limit = 65535
service mysqld restart
#根据不同系统或
systemctl restart mysqld

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注