<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    qileilove

    blog已經(jīng)轉(zhuǎn)移至github,大家請訪問 http://qaseven.github.io/

    Magento數(shù)據(jù)庫配置選項,以及mysql 讀寫分離

    1.數(shù)據(jù)庫配置
      [mysqld]
    key_buffer = 512M
    max_allowed_packet = 64M
    table_cache = 512
    sort_buffer_size = 4M
    read_buffer_size = 4M
    read_rnd_buffer_size = 2M
    myisam_sort_buffer_size = 64M
    tmp_table_size = 128M
    query_cache_size = 96M
    query_cache_type = 1
    thread_cache_size = 8
    max_connections = 400
    wait_timeout = 300
      2.innodb
    #innodb_data_home_dir = C:\mysql\data/
    #innodb_data_file_path = ibdata1:10M:autoextend
    #innodb_log_group_home_dir = C:\mysql\data/
    #innodb_log_arch_dir = C:\mysql\data/
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 16M
    #innodb_additional_mem_pool_size = 2M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 5M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50
      example1:
    innodb_additional_mem_pool_size = 16M
    innodb_log_buffer_size = 8M
    innodb_log_file_size = 512M
    innodb_log_files_in_group = 2
    innodb_buffer_pool_size = 3G
    innodb_data_file_path = ibdata1:3G;ibdata2:1G:autoextend
    innodb_autoextend_increment=512


      example2:
    # Run a 64-bit operating system. Do not exceed 2GB memory for the following
    # combination on 32-bit systems:
    # innodb_buffer_pool_size + key_buffer_size + max_connections*(sort_buffer_size +
    # read_buffer_size + binlog_cache_size) + max_connections*2MB
    # On dedicated db server assign up to 80% of free memory to innodb buffer
    # On combined web/db server take into account apache instances and php
    innodb_buffer_pool_size         = 768M  #Data Page Memory Buffer
    # Table metadata requires 2-16M, Magento only has abt 330 tables
    innodb_additional_mem_pool_size = 2M    #Data Dictionary < 16M
    # SHOW GLOBAL STATUS Innodb_log_waits should be 0 or the next setting
    # innodb_log_file_size is too small. Holds changed data for lazy write to
    # innodb database. To change size, database must be flushed to disk, database
    # backed up, mysqld server must be downed, log files renamed, change
    # my.cnf and mysqld brought back up. Log files will be recreated in
    # proper number and size
    innodb_log_file_size            = 100M  #Transaction Log up to 1/4 Buffer Pool
    #innodb_log_files_in_group      = 2     #Default is 2
    # Buffer for transactions to be written to log file
    innodb_log_buffer_size          = 2M    #Transaction Memory Buffer 1-8M
    #Recommended (2xcores)+disks, KEEP LOW < 16 More is not better tune for
    #best performance
    innodb_thread_concurrency       = 3
    #Set this up before you install Magento. Create primary innodb table at 2GB
    #and secondary autoextend table for growth
    #Changing this after you've gone live requires eliminating the ibdata files and log files
    innodb_data_file_path = ibdata1:2048M;ibdata2:50M:autoextend
    #Amount to add on autoextend. Keep this large to keep blocks in file contiguous
    innodb_autoextend_increment = 512M
      3.mysql讀寫分離配置
    <resources>
    <db>
    <table_prefix><![CDATA[]]></table_prefix>
    </db>
    <default_setup>
    <connection>
    <host><![CDATA[localhost]]></host>
    <username><![CDATA[root]]></username>
    <password><![CDATA[]]></password>
    <dbname><![CDATA[mg_wailian]]></dbname>
    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
    <model><![CDATA[mysql4]]></model>
    <type><![CDATA[pdo_mysql]]></type>
    <pdoType><![CDATA[]]></pdoType>
    <active>1</active>
    </connection>
    </default_setup>
    <default_read>
    <connection>
    <host><![CDATA[localhost]]></host>
    <username><![CDATA[root]]></username>
    <password><![CDATA[]]></password>
    <dbname><![CDATA[mg_wailian]]></dbname>
    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
    <model><![CDATA[mysql4]]></model>
    <type><![CDATA[pdo_mysql]]></type>
    <pdoType><![CDATA[]]></pdoType>
    <active>1</active>
    </connection>
    </default_read>
    </resources>
      3.分離讀寫數(shù)據(jù)庫,然后主從同步,是一個很好的選擇。

    posted on 2014-01-02 09:02 順其自然EVO 閱讀(292) 評論(0)  編輯  收藏 所屬分類: 數(shù)據(jù)庫

    <2014年1月>
    2930311234
    567891011
    12131415161718
    19202122232425
    2627282930311
    2345678

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿(55)

    隨筆分類

    隨筆檔案

    文章分類

    文章檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 久久噜噜噜久久亚洲va久| 亚洲 小说区 图片区 都市| 久久精品国产99精品国产亚洲性色| 色多多免费视频观看区一区| 免费中文字幕在线| 亚洲精品色在线网站| 国产精品另类激情久久久免费| 亚洲日韩国产欧美一区二区三区 | 无码精品人妻一区二区三区免费| 在线观看91精品国产不卡免费| 色噜噜的亚洲男人的天堂| 国产免费怕怕免费视频观看| 日韩在线观看免费| 亚洲色一区二区三区四区| 午夜精品一区二区三区免费视频 | 四虎影院在线免费播放| 岛国岛国免费V片在线观看| 亚洲综合色丁香麻豆| 亚洲国产精品一区二区九九| 69式互添免费视频| a在线视频免费观看在线视频三区| 亚洲第一香蕉视频| 国内精品99亚洲免费高清| 毛片A级毛片免费播放| 人人玩人人添人人澡免费| 国产精品亚洲精品日韩动图| 亚洲美女免费视频| 亚洲情XO亚洲色XO无码| 精品国产免费观看一区| 永久看日本大片免费35分钟| 九一在线完整视频免费观看| 亚洲色图激情文学| 亚洲综合日韩中文字幕v在线| 亚洲日韩国产一区二区三区| 岛国av无码免费无禁网站| 麻豆成人久久精品二区三区免费| 五月天婷婷精品免费视频| 亚洲国产美女精品久久久| 亚洲人成毛片线播放| 日韩精品一区二区亚洲AV观看 | 亚欧免费一级毛片|