[client]
port=3306
socket=/tmp/mysql.sock
default-character-set=utf8
[mysql]
no-auto-rehash
default-character-set=utf8
[mysqld]
port=3306
character-set-server=utf8
socket=/tmp/mysql.sock
basedir=/usr/local/mysql
datadir=/mydata/data
explicit_defaults_for_timestamp=true
lower_case_table_names=1
back_log=103
max_connections=10000
max_connect_errors=100000
table_open_cache=512
external-locking=FALSE
max_allowed_packet=32M
sort_buffer_size=2M
join_buffer_size=2M
thread_cache_size=51
query_cache_size=32M
#query_cache_limit=4M
transaction_isolation=REPEATABLE-READ
tmp_table_size=96M
max_heap_table_size=96M
###***slowqueryparameters
long_query_time=3
slow_query_log = 1
slow_query_log_file=/mydata/data/slow.log
# replication
log-bin=mysql-bin
server-id=1
binlog_format= ROW
gtid_mode = on
enforce_gtid_consistency = 1
log_slave_updates= 1
master-info-repository=TABLE
relay-log-info-repository=TABLE
#***MyISAMparameters
key_buffer_size=16M
read_buffer_size=1M
read_rnd_buffer_size=16M
bulk_insert_buffer_size=1M
#innodbstorageengineparameters
innodb_buffer_pool_size=4G
innodb_data_file_path=ibdata1:1G:autoextend
#innodb_file_io_threads=8#默认的是4
innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_thread_concurrency=16
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16M
innodb_log_file_size=256M
innodb_log_files_in_group=2
innodb_max_dirty_pages_pct=75
#innodb_buffer_pool_dump_pct=75
innodb_lock_wait_timeout=50
innodb_file_per_table=1#独立表空间
[mysqldump]
quick
max_allowed_packet=32M
[mysqld_safe]
open-files-limit=10240
log-error=/mydata/data/error.log
pid-file=/mydata/data/mysqld.pid
推荐阅读
- mysql|InnoDB数据页结构
- javaweb|基于Servlet+jsp+mysql开发javaWeb学生成绩管理系统
- mysql|一文深入理解mysql
- Java毕业设计项目实战篇|Java项目:在线嘿嘿网盘系统设计和实现(java+Springboot+ssm+mysql+maven)
- SQL|SQL基本功(五)--函数、谓词、CASE表达式
- vue|电商后台管理系统(vue+python|node.js)
- Java及基础算法及数据结构|旧笔记整理(MySQL)
- mysql|双非本211硕,无实习无项目,自学大数据开发,秋招上岸
- 数据库|Mysql--InnoDB存储引擎详解
- MySQL学习笔记-9-order by