博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mysql的配置文件创建相关
阅读量:5324 次
发布时间:2019-06-14

本文共 1249 字,大约阅读时间需要 4 分钟。

1. 参见《高性能mysql》的第8章;

2. 在第一步的基础上,然后借助https://tools.percona.com/来创建。

以下是通过tools.percona.com生成的mysql.cnf配置文件,基于16c,32G的配置

[mysql]

# CLIENT #

port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]

# GENERAL #

user = mysql
default-storage-engine = InnoDB
socket = /var/lib/mysql/mysql.sock
pid-file = /var/lib/mysql/mysql.pid

# MyISAM #

key-buffer-size = 32M
myisam-recover-options = FORCE,BACKUP

# SAFETY #

max-allowed-packet = 16M
max-connect-errors = 1000000
innodb = FORCE

# DATA STORAGE #

datadir = /var/lib/mysql/

# BINARY LOGGING #

log-bin = /var/lib/mysql/mysql-bin
expire-logs-days = 14
sync-binlog = 1

# CACHES AND LIMITS #

tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 5000
thread-cache-size = 100
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 4096

# INNODB #

innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 512M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 26G

# LOGGING #

log-error = /var/lib/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log

转载于:https://www.cnblogs.com/alpha1981/p/9054502.html

你可能感兴趣的文章
《当幸福来敲门》读后
查看>>
【转】系统无法进入睡眠模式解决办法
查看>>
省市县,循环组装,整合大数组
查看>>
stm32中字节对齐问题(__align(n),__packed用法)
查看>>
like tp
查看>>
posix多线程有感--线程高级编程(线程属性函数总结)(代码)
查看>>
spring-使用MyEcilpse创建demo
查看>>
DCDC(4.5V to 23V -3.3V)
查看>>
kettle导数到user_用于left join_20160928
查看>>
activity 保存数据
查看>>
typescript深copy和浅copy
查看>>
linux下的静态库与动态库详解
查看>>
hbuilder调底层运用,多张图片上传
查看>>
深入理解基于selenium的二次开发
查看>>
较快的maven的settings.xml文件
查看>>
Git之初体验 持续更新
查看>>
Exception in thread "AWT-EventQueue-0" java.lang.IllegalThreadStateException
查看>>
随手练——HDU 5015 矩阵快速幂
查看>>
启动redis一闪就关
查看>>
Maven之setting.xml配置文件详解
查看>>