The storage engine for database configuration optimization is mainly innodb, 2 GB memory is planned for Mysql to run the configuration file. Java code skip-external-locking key_buffer_size = 16 M bytes = 1 M table_open_cache = 512 sort_buffer_size = 16 M net_buffer_length = 8 K read_buffer_size = 2 M = 8 M bytes = 16 M query_cache_size = 32 M query_cache_type = 1 max_connections = 1024 bytes = 10 max_binlog_size = 256 M long_query_time = 1 slow_query_log = 1 # bytes =/usr/local/mysql/ data # innodb_data_file_path = ibdata1: 10 M: autoextend # innodb_log_group_home_dir =/usr/local/mysql/data # You can set .. _ buffer_pool_size up to 50-80% # of RAM but beware of setting memory usage too high innodb_buffer_pool_size = 1G innodb_additional_mem_pool_size = 128 M # Set .. _ log_file_size to 25% of buffer pool size innodb_log_file_size = 256 M innodb_log_buffer_size = 8 M # modify this parameter to greatly improve database performance limit = 2 # Limit = 90 # innodb_lock_wait_timeout = 120