mysql 參數配置最佳化

來源:互聯網
上載者:User

標籤:mysql 參數配置最佳化

1 資料檔案與二進位記錄檔確保分別存放在不同的磁碟上,防範磁碟故障

2 設定開啟innodb引擎,default-storage-engine=innodb

3 設定innodb_file_per_tablecan參數,讓每個 innodb表使用單獨的ibd檔案 

4 設定靈活資料表空間 innodb_data_home_dir = /home/mysql/data  innodb_data_file_path

5 設定innodb_log_file_size大小為512M ;不能少於256M

6 設定innodb_open_files為1000  ; 不少於500

7 設定thread_cache_size為500;不少於200

8 設定innodb_buffer_pool_size大小50G,一般保證不低於實體記憶體的25% ,不高於75%

9 設定max_connection   5000

10 設定max_connection_error 100000

11 設定open_files_limit  50000

12 設定table_open_cache 50000

13 設定table_definition_cache 50000

14 設定skip_name_resolve參數,強制使用ip串連資料庫

15 設定關閉查詢快取 query_cache_size=0;query_cache_type=0




本文出自 “實用Linux知識技能分享” 部落格,請務必保留此出處http://superleedo.blog.51cto.com/12164670/1892232

mysql 參數配置最佳化

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.