mysql配置文件my.cnf模板
[client]
default-character-set = utf8mb4
port = PORT
socket = /srv/myPORT/run/mysql.sock [mysqld]
user = mysql
port = PORT
extra-port = 1PORT
character_set_server = utf8mb4
server_id = SERVER_ID
socket = /srv/myPORT/run/mysql.sock
basedir = /opt/percona-server
datadir = /srv/myPORT/data
log-error = /srv/myPORT/log/alert.log
pid-file = /srv/myPORT/run/mysql.pid --------------二进制日志相关-----------------------------------------
log_slave_updates = 1
log-bin = /srv/myPORT/log/mysql-bin
binlog_format = row
binlog_cache_size = 2M
max_binlog_cache_size = 4G
max_binlog_size = 1G
expire_logs_days = 7
--------------中继日志相关------------------------------------------
relay-log = /srv/myPORT/log/relay-bin
relay-log-info-file = /srv/myPORT/log/relay-log.info
relay-log-index = /srv/myPORT/log/relay-log.index
master-info-file = /srv/myPORT/log/master.info
relay-log-recovery = true
sync-relay-log-info = 1 --------------全局缓存----------------------------------------------
key_buffer_size = 2M
query_cache_size = 1M
query_cache_limit = 1M
query_cache_min_res_unit = 2k
table_open_cache = 2048 --------------线程缓存----------------------------------------------
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
join_buffer_size = 2M
thread_cache_size = 1024
tmp_table_size = 16M
thread_stack = 192k
bulk_insert_buffer_size = 64M
max_heap_table_size = 64M --------------连接相关-----------------------------------------------
back_log = 3000
max_connections = 4000
max_user_connections = 2500
max_connect_errors = 100 --------------慢查询相关--------------------------------------------
long_query_time = 0.5
slow_query_log = on
slow_query_log_file = /srv/myPORT/log/slow.log --------------系统级别参数-------------------------------------------
skip-name-resolve
explicit_defaults_for_timestamp
open_files_limit = 65535
max_allowed_packet = 512M
default-storage-engine = INNODB
transaction_isolation = READ-COMMITTED ----------------Innodb相关--------------------------------------------
innodb_buffer_pool_size = 10G
innodb_data_file_path = ibdata1:2G:autoextend
innodb_file_io_threads = 24
innodb_purge_threads = 12
innodb_read_io_threads = 24
innodb_write_io_threads = 24
innodb_thread_concurrency = 24
innodb_buffer_pool_instances = 8
innodb_flush_log_at_trx_commit= 1
innodb_log_buffer_size = 16M
innodb_log_file_size = 2G
innodb_log_files_in_group = 2
innodb_max_dirty_pages_pct = 75
innodb_lock_wait_timeout = 50
innodb_file_per_table = 1 ----------------线程相关------------------------------------------------
thread_handling = pool-of-threads
thread_pool_idle_timeout = 180
thread_pool_max_threads = 5000
thread_pool_size = 24
thread_pool_oversubscribe = 10
thread_pool_stall_limit = 500 [mysqldump]
quick
max_allow_packet = 64M [mysql]
no-auto-rehash [mysqlhotcopy]
interactive-timeout
mysql配置文件my.cnf模板的更多相关文章
- MySQL配置文件my.cnf 例子最详细翻译
转的 MySQL配置文件my.cnf 例子最详细翻译,可以保存做笔记用. #BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载 ...
- mysql配置文件my.cnf详解
原文地址:mysql配置文件my.cnf详解 作者:gron basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的 ...
- MySQL 配置文件my.cnf
转载: MySQL配置文件my.cnf 详解:#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM ...
- Linux中MySQL配置文件my.cnf参数优化
MySQL参数优化这东西不好好研究还是比较难懂的,其实不光是MySQL,大部分程序的参数优化,是很复杂的.MySQL的参数优化也不例外,对于不同的需求,还有硬件的配置,优化不可能又最优选择,只能慢慢的 ...
- 解决mysql配置文件my.cnf添加max_connections不生效
问题描述: 最新为了方便测试,通过mysql官方指定的yum源安装了mysql5.6.40,在向mysql的配置文件my.cnf添加max_connections=3600后,重启mysql后发现不生 ...
- linux下mysql配置文件my.cnf最详细解释
MySQL配置文件在Windows下叫my.ini,在MySQL的安装根目录下:在Linux下叫my.cnf,该文件位于/etc/my.cnf. 可以查找下:find / -name my.cnf m ...
- MySQL配置文件my.cnf中文详解
#BEGIN CONFIG INFO #DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大 #TYPE: SYSTEM #END CONFIG INFO # # ...
- MySQL配置文件my.cnf中文详解附mysql性能优化方法分享
Mysql参数优化对于新手来讲,是比较难懂的东西,其实这个参数优化,是个很复杂的东西,对于不同的网站,及其在线量,访问量,帖子数量,网络情况,以及机器硬件配置都有关系,优化不可能一次性完成,需要不断的 ...
- [Mysql] MySQL配置文件my.cnf的理解
一.缘由 最近要接手数据库的维护工作,公司首选MySQL.对于MySQL的理解,我认为很多性能优化工作.主从主主复制都是在调整参数,来适应不同时期不同数量级的数据. 故,理解透彻my.cnf里的参数是 ...
随机推荐
- MyBatis之one2one与one2many
<!--顾客信息表,其中一个顾客对应一个国家,一个顾客对应多个订单--> <resultMap id="customerResultMap" type=" ...
- Godray
软管的这个有点蛋疼..应该是我材质没弄好 最后发现不是材质,是法线不正确,调整后
- cocos2d - CCSprite各种动画
转自 ITeye技术网站 // 触摸屏 -(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for( UITouc ...
- Masonry插件:内容始终水平居中
跟随浏览器框架大小,主题内容居中 代码 <!DOCTYPE html> <html> <head> <title>masonry瀑布流插件</ti ...
- .NET条形码
建议不要用CODE-39码,改用CODE-128码: CODE-39码密度比较低,条码数字内容太多,导致条码太长,缩短长度就只能减小X尺寸,造成识读困难: CODE-128码密度高,相同的数字生成条码 ...
- js替换数组中的一个对象用for循环遍历
for(let i=0;i<statusList.length;i++){ if (statusList[i]['tableId'] === tableId) { statusList[i]=d ...
- lua 时间戳和时间互相转换
1.时间戳转换成时间 local t = 1412753621000 function getTimeStamp(t) return os.date("%Y%m%d%H", ...
- make screenshot at Eclipse
In Eclipse, from the Window menu, select Open Perspective > Other... > DDMS. Select the Kindle ...
- WebGL常用数学公式
1.三角函数 坐标轴采用右手法则,沿Z轴的逆时针方向为正角度,假设原始点为p(x,y,z),a是X轴旋转到点p的角度,r是从原始点到p点的距离.用这两个变量计算出点p的坐标,等式如下: x = rco ...
- springmvc+jquery实现省市区地址下拉框联动
参考资料:http://www.cnblogs.com/whgw/archive/2012/05/11/2496667.html 1.jsp页面实现 <%@ page language=&quo ...