二、mysql設定檔範本

來源:互聯網
上載者:User

標籤:mysql 設定檔 my.cnf

引用《高效能MySQL》第8章

my.cnf內容:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html

[mysqld]
# basedir = .....
# server_id = .....
 datadir = /var/lib/mysql
 port = 3306
 socket = /var/lib/mysql/mysql.sock
 pid_file = /var/lib/mysql/mysql.pid
 user = mysql
 default_storage_engine = InnoDB
 
# InnoDB
 innodb_buffer_pool_size = <value>

 innodb_log_file_size = <value>

 innodb_file_per_table = 1
 innodb_flush_nethod = 0_DIRECT
 
# MyISAM
 key_buffer_size = <value>

# log
# log_bin
 log_error = /var/lib/mysql/mysql-error.log
 slow_query_log = /var/lib/mysql/mysql-slow.log

# other
 tmp_table_size = 32M
 max_heap_table_size = 32M
 query_cache_type = 0
 query_cache_size = 0
 max_connections = <value>

 thread_cache = <value>

 table_cache = <value>

 open_files_limit = 65535
 
 [client]
 socket = /var/lib/mysql/mysql.sock
 port = 3306

 


 
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

 

explicit_defaults_for_timestamp
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

本文出自 “1058223494” 部落格,請務必保留此出處http://4708705.blog.51cto.com/4698705/1585116

二、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.