直接将下面参数copy到你的my.ini文件中即可使用。优化得很好。
如果配置了无法启动mysql服务器,说明版本不对。可以查看报错信息,删除不需要的配置即可
max_connections=1024
auto_increment_increment = 1
auto_increment_offset = 1
back_log = 3000
binlog_cache_size = 128KB
binlog_checksum = CRC32
binlog_row_image = full
binlog_stmt_cache_size = 32768
character_set_server = utf8mb4
concurrent_insert = 1
connect_timeout = 10
default_storage_engine = InnoDB
default_time_zone = SYSTEM
default_week_format = 0
delayed_insert_limit = 100
delayed_insert_timeout = 300
delayed_queue_size = 1000
delay_key_write = ON
div_precision_increment = 4
eq_range_index_dive_limit = 10
explicit_defaults_for_timestamp = false
ft_min_word_len = 4
ft_query_expansion_limit = 20
group_concat_max_len = 1024
innodb_adaptive_hash_index = ON
innodb_autoinc_lock_mode = 1
innodb_concurrency_tickets = 5000
innodb_ft_max_token_size = 84
innodb_ft_min_token_size = 3
innodb_large_prefix = OFF
innodb_lock_wait_timeout = 50
innodb_max_dirty_pages_pct = 75
innodb_old_blocks_pct = 37
innodb_old_blocks_time = 1000
innodb_online_alter_log_max_size = 134217728
innodb_open_files = 3000
innodb_print_all_deadlocks = OFF
innodb_purge_batch_size = 300
innodb_purge_threads = 1
innodb_read_ahead_threshold = 56
innodb_read_io_threads = 4
innodb_rollback_on_timeout = OFF
innodb_stats_method = nulls_equal
innodb_stats_on_metadata = OFF
innodb_stats_sample_pages = 8
innodb_strict_mode = OFF
innodb_table_locks = ON
innodb_thread_concurrency = 0
innodb_thread_sleep_delay = 10000
innodb_write_io_threads = 4
interactive_timeout = 7200
key_cache_age_threshold = 300
key_cache_block_size = 1024
key_cache_division_limit = 100
log_queries_not_using_indexes = OFF
long_query_time = 1
loose_max_statement_time = 0
loose_rds_tablestat = OFF
loose_rds_threads_running_high_watermark = 50000
low_priority_updates = 0
max_allowed_packet = 1024M
max_connect_errors = 100
max_length_for_sort_data = 1024
max_prepared_stmt_count = 16382
max_write_lock_count = 102400
myisam_sort_buffer_size = 262144
net_read_timeout = 30
net_retry_count = 10
net_write_timeout = 60
open_files_limit = 65535
performance_schema = OFF
query_alloc_block_size = 8192
query_cache_limit = 1048576
query_cache_size = 3145728
query_cache_type = 0
query_cache_wlock_invalidate = OFF
query_prealloc_size = 8192
slow_launch_time = 2
sql_mode =
table_definition_cache = 512
table_open_cache = 2000
thread_stack = 262144
tmp_table_size = 2097152
transaction_isolation = READ-COMMITTED
wait_timeout = 86400