mysql 优化
[mysqld]
innodb_buffer_pool_size = 2G
innodb_file_per_table = ON
innodb_log_buffer_size= 100M
innodb_log_file_size = 100M
innodb_data_file_path = ibdata1:1024M;ibdata2:1024M:autoextend
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 12
innodb_flush_neighbors = 1
innodb_purge_threads = 4
innodb_large_prefix = 1
innodb_print_all_deadlocks = 1
innodb_strict_mode = 1
innodb_lock_wait_timeout = 5
skip_name_resolve = 1
skip_ssl = 1
lower_case_table_names = 1
#basedir = /opt/mysql
datadir = /ccdata/mysql/
port = 3306
socket = /var/lib/mysql/mysql.sock
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
key_buffer_size = 16M
max_connect_errors = 10000
max_connections = 3000
open_files_limit = 65535
log_error = /var/log/mysqld.log
#log_timestamps = SYSTEM
character-set-server = utf8
explicit_defaults_for_timestamp=true
log-bin=mysql-bin
binlog-format=ROW
[mysql]
default-character-set=utf8
目录 返回
首页