標籤:資料庫 設定檔 解析 my.cnf
# Example MySQL config file for small systems.
#資料庫最小系統設定檔範例
# This is for a system with little memory (<= 64M) where MySQL is only used# from time to time and it‘s important that the mysqld daemon# doesn‘t use much resources.
#這個配置時為記憶體比較小的系統且資料庫不連續使用的系統設定的,
#最重要的時它的後台服務幾乎不會使用太多資源
# MySQL programs look for option files in a set of# locations which depend on the deployment platform.# You can copy this option file to one of those# locations. For information about these locations, see:# http://dev.mysql.com/doc/mysql/en/option-files.html
#資料庫程式尋找調度平台可以調度的一些位置的選項檔案。
#你可以把選項檔案複製到這些位置
# In this file, you can use all long options that a program supports.# If you want to know which options a program supports, run the program# with the "--help" option.
#在這個檔案中,你可以使用程式支援的所有長選項。
#如果你想只知道程式支援哪個選項,運行程式尋找協助
# The following options will be passed to all MySQL clients
#下列選項應用到資料庫的用戶端
[client] #password= your_password #密碼port= 3306 #連接埠 socket= /tmp/mysql.sock #socket位置
# Here follows entries for some specific programs
#接下來的條目是為一些特別程式準備的
# The MySQL server [mysqld]port= 3306 #連接埠socket= /tmp/mysql.sock #socket位置skip-external-locking #跳過擴充鎖key_buffer_size = 16K #金鑰快取是 16Kmax_allowed_packet = 1M #允許最大資訊包 1Mtable_open_cache = 4 #開啟表緩衝 4sort_buffer_size = 64K #排序緩衝 64Kread_buffer_size = 256K #讀緩衝區 256Kread_rnd_buffer_size = 256K #net_buffer_length = 2K #網路緩衝長度2Kthread_stack = 128K #線程堆 128K
# Don‘t listen on a TCP/IP port at all. This can be a security enhancement,# if all processes that need to connect to mysqld run on the same host.# All interaction with mysqld must be made via Unix sockets or named pipes.# Note that using this option without enabling named pipes on Windows# (using the "enable-named-pipe" option) will render mysqld useless!# #skip-networkingserver-id= 1
#不要一直監聽一個tcp/ip連接埠。如果所有進程需要串連到相同主機資料庫後台,那麼這個是安全加強項。
#和資料庫背景所有互動必須經過Unix code或具名管道。
#注意如果windows沒有啟用相應選項(enable-named-pipe),這個選項是無效的。
# Uncomment the following if you want to log updates #日誌更新#log-bin=mysql-bin
# binary logging format - mixed recommended#binlog_format=mixed
# 二進位混合格式日誌記錄
# Causes updates to non-transactional engines using statement format to be# written directly to binary log. Before using this option make sure that# there are no dependencies between transactional and non-transactional# tables such as in the statement INSERT INTO t_myisam SELECT * FROM# t_innodb; otherwise, slaves may diverge from the master.#binlog_direct_non_transactional_updates=TRUE
#更新到非事務引擎使用說明格式寫到二進位日誌中,
#使用這個選項之前確保依賴在事務和非事務表
#例如:插入資料。否則,備機和主機背道而馳。
# Uncomment the following if you are using InnoDB tables #是否使用Innodb表#innodb_data_home_dir = /usr/local/mysql/data#innodb_data_file_path = ibdata1:10M:autoextend#innodb_log_group_home_dir = /usr/local/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
[mysqldump] #備份quickmax_allowed_packet = 16M
[mysql]#no-auto-rehash
#命令不自動補全 http://blog.51yip.com/mysql/1056.html
auto-rehash
#修改為自動補全 只能提示表名和表裡面欄位名
# Remove the next comment character if you are not familiar with SQL #安全更新#safe-updates
[myisamchk]
#獲得有關你的資料庫表的統計資訊或檢查、修複、最佳化他們 http://blog.csdn.net/wyzxg/article/details/7303486
key_buffer_size = 8M
sort_buffer_size = 8M
[mysqlhotcopy]
#熱備 https://www.centos.bz/2011/11/backup-mysql-database-with-mysqlhotcopy/
interactive-timeout
本文出自 “11282743” 部落格,請務必保留此出處http://11292743.blog.51cto.com/11282743/1910327
mysql設定檔my-small.cnf解析,漢文翻譯,配置