Create My MySQL configuration by Percona

系统 1780 0

本文地址: http://www.cnblogs.com/yhLinux/p/4013065.html

https://tools.percona.com/

Percona是一款在线自动生成MySQL配置文件的工具,提供的MySQL配置文件做了优化处理。

首先,需要注册,然后按网站上提示选择设置,一共7步。

      # Generated by Percona Configuration Wizard (http:
      
        //
      
      
        tools.percona.com/) version REL5-20120208
      
      

# Configuration name server-dev-binary-
      
        1009
      
       generated 
      
        for
      
       #**********@
      
        163
      
      .com at 
      
        2014
      
      -
      
        10
      
      -
      
        09
      
      
        04
      
      :
      
        32
      
      :
      
        10
      
      
        



[mysql]



# CLIENT #

port                           
      
      = 
      
        3306
      
      
        

socket                         
      
      = /usr/local/mysql/data/
      
        mysql.sock



[mysqld]



# GENERAL #

user                           
      
      =
      
         mysql

default
      
      -storage-engine         =
      
         InnoDB

socket                         
      
      = /usr/local/mysql/data/
      
        mysql.sock

pid
      
      -
      
        file
      
                             = /usr/local/mysql/data/
      
        mysql.pid



# MyISAM #

key
      
      -buffer-size                =
      
         32M

myisam
      
      -recover                 =
      
         FORCE,BACKUP



# SAFETY #

max
      
      -allowed-packet             =
      
         16M

max
      
      -connect-errors             = 
      
        1000000
      
      
        



# DATA STORAGE #

datadir                        
      
      = /usr/local/mysql/data/
      
        



# BINARY LOGGING #

log
      
      -bin                        = /usr/local/mysql/data/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                = 
      
        500
      
      
        

thread
      
      -cache-size              = 
      
        50
      
      
        

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           =
      
         64M

innodb
      
      -flush-log-at-trx-commit = 
      
        1
      
      
        

innodb
      
      -
      
        file
      
      -per-table          = 
      
        1
      
      
        

innodb
      
      -buffer-pool-size        =
      
         128M



# LOGGING #

log
      
      -error                      = /usr/local/mysql/data/mysql-
      
        error.log

log
      
      -queries-not-using-indexes  = 
      
        1
      
      
        

slow
      
      -query-log                 = 
      
        1
      
      
        

slow
      
      -query-log-
      
        file
      
                  = /usr/local/mysql/data/mysql-slow.log
    

 

Create My MySQL configuration by Percona


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论