[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模板的更多相关文章

  1. MySQL配置文件my.cnf 例子最详细翻译

    转的 MySQL配置文件my.cnf 例子最详细翻译,可以保存做笔记用. #BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载 ...

  2. mysql配置文件my.cnf详解

    原文地址:mysql配置文件my.cnf详解 作者:gron basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的 ...

  3. MySQL 配置文件my.cnf

    转载: MySQL配置文件my.cnf 详解:#BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM ...

  4. Linux中MySQL配置文件my.cnf参数优化

    MySQL参数优化这东西不好好研究还是比较难懂的,其实不光是MySQL,大部分程序的参数优化,是很复杂的.MySQL的参数优化也不例外,对于不同的需求,还有硬件的配置,优化不可能又最优选择,只能慢慢的 ...

  5. 解决mysql配置文件my.cnf添加max_connections不生效

    问题描述: 最新为了方便测试,通过mysql官方指定的yum源安装了mysql5.6.40,在向mysql的配置文件my.cnf添加max_connections=3600后,重启mysql后发现不生 ...

  6. linux下mysql配置文件my.cnf最详细解释

    MySQL配置文件在Windows下叫my.ini,在MySQL的安装根目录下:在Linux下叫my.cnf,该文件位于/etc/my.cnf. 可以查找下:find / -name my.cnf m ...

  7. MySQL配置文件my.cnf中文详解

    #BEGIN CONFIG INFO #DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大 #TYPE: SYSTEM #END CONFIG INFO # # ...

  8. MySQL配置文件my.cnf中文详解附mysql性能优化方法分享

    Mysql参数优化对于新手来讲,是比较难懂的东西,其实这个参数优化,是个很复杂的东西,对于不同的网站,及其在线量,访问量,帖子数量,网络情况,以及机器硬件配置都有关系,优化不可能一次性完成,需要不断的 ...

  9. [Mysql] MySQL配置文件my.cnf的理解

    一.缘由 最近要接手数据库的维护工作,公司首选MySQL.对于MySQL的理解,我认为很多性能优化工作.主从主主复制都是在调整参数,来适应不同时期不同数量级的数据. 故,理解透彻my.cnf里的参数是 ...

随机推荐

  1. C# webbrowser判断页面是否加载完毕

    private void Form1_Load(object sender, EventArgs e) { webalipay.Url = new Uri("https://authzth. ...

  2. VS常用快捷鍵

    折疊所有方法 Ctrl +M +M 折疊單個方法 Ctrl +M +O 折疊單個方法

  3. 如何在Linux系统中安装VMware

    首先打开vmware官网的下载链接:https://my.vmware.com/web/vmware/info/slug/desktop_end_user_computing/vmware_works ...

  4. tomcat启动时出现了Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]

    https://blog.csdn.net/imjcoder/article/details/78725267 <dependency> <groupId>org.spring ...

  5. MS Chart Control 學習手記(二) - 圓餅圖

    using System.Web.UI.DataVisualization.Charting; 02 using System.Drawing; 03   04 namespace Chart.AJA ...

  6. HTTPS原理,以及加密、解密的原理。

    https://blog.csdn.net/Yang_yangyang/article/details/79702583 摘要:本文用图文的形式一步步还原HTTPS的设计过程,进而深入了解原理. A在 ...

  7. linux nginx svn 更新前端代码

    1.进入项目前端代码目录中 root@TServer:~# cd /home/p/web/gongti/ 2.更新svn上最新的代码版本 root@TServer:/home/p/web/gongti ...

  8. .NET Framework 4.0源代码

    原文出处:http://blogs.microsoft.co.il/blogs/arik/archive/2010/07/12/step-into-net-framework-4-0-source-c ...

  9. flexbox父盒子flex-direction属性

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. messagpack的使用

    我打算使用messagepack对通信的对象进行序列化,使用的方式参考这篇文章: http://www.cppfans.org/1410.html 此处记录一下自己遇到的一些问题 先是用VS2010对 ...