mysql8의 설정 최적화

1857 단어
[mysqld]
#    bin log
skip-log-bin

#   3306  
port=3388
#   mysql     
basedir=F:\\mysql8\\data
#            \\,         
#   mysql           
datadir=F:\\mysql8\\data
#        
max_connections=20
#          。                     
max_connect_errors=10
#             UTF8
character-set-server=utf8

#     “mysql_native_password”    
default_authentication_plugin=mysql_native_password

#InnoDB#
#                
default-storage-engine=INNODB
#   
innodb_buffer_pool_size=4G

#  1  
#      ,    [0:    ,1:    ,2: 0    0  ]   ,           2,         1
innodb_flush_log_at_trx_commit=1
#   1    1 ,   n
sync_binlog=1

#    innodb_buffer_pool_size    ,        
# 25%~50%
innodb_max_dirty_pages_pct=30

#       IO    
#   200,  SSD,   5000~20000
innodb_io_capacity=200

#   10M。      ,      
innodb_data_file_path=ibdata1:1024M:autoextend

#   2,  s。     。  0.1~0.5
long_qurey_time=0.3

# 8.0  row。    ,       
binlog_format=row

#   8  。              
#   300~500s,        ,     
interactive_timeout=500
wait_timeout=500

#    
innodb_log_file_size=256M
#      
innodb_log_buffer_size=12M

innodb_flush_log_at_trx_commit=2
#innodb_flush_method
#thread_cache=8
#innodb_autoextend_increment=128M

#              
innodb_file_per_table=1
#innodb_file_format=barracuda #mysql 8       
#         ,        ,       ,   CPU     ;
#  ,        ,  CPU   。   6,    0-9#
innodb_compression_level=6
#                      ,
#           innodb_compression_failure_threshold_pct      ,             。
#   50,       0 75
innodb_compression_pad_pct_max=50

server-id=1180

[mysql]
#   mysql        
default-character-set=utf8
[client]
#   mysql                
port=3388
default-character-set=utf8
···
![     ,      !!!.jpg](https://upload-images.jianshu.io/upload_images/18094074-6bf274077085780f.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)

좋은 웹페이지 즐겨찾기