MySQL Query Cache(缓存)(二)

2014-11-24 13:59:25 · 作者: · 浏览: 1
O MASTER_HOST=, MASTER_PORT=,
# MASTER_USER=, MASTER_PASSWORD= ;
#
# where you replace , , by quoted strings and
# by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host =
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user =
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port =
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = C:\mysql\data/
# # InnoDB 将数据保存在一个或者多个数据文件中成为表空间.
# # 如果你只有单个逻辑驱动保存你的数据,一个单个的自增文件就足够好了.
# # 其他情况下.每个设备一个文件一般都是个好的选择.
# # 你也可以配置InnoDB来使用裸盘分区 - 请参考手册来获取更多相关内容
innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_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使用一个缓冲池来保存索引和原始数据, 不像 MyISAM.
# # 这里你设置越大,你在存取表里面数据时所需要的磁盘I/O越少.
# # 在一个独立使用的数据库服务器上,你可以设置这个变量到服务器物理内存大小的80%
# # 不要设置过大,否则,由于物理内存的竞争可能导致操作系统的换页颠簸.
# # 注意在32位系统上你每个进程可能被限制在 2-3.5G 用户层面内存限制,
# # 所以不要设置的太高.
innodb_buffer_pool_size = 64M
# # 附加的内存池被InnoDB用来保存 metadata 信息
# # 如果InnoDB为此目的需要更多的内存,它会开始从OS这里申请内存.
# # 由于这个操作在大多数现代操作系统上已经足够快, 你一般不需要修改此值.
# # SHOW INNODB STATUS 命令会显示当先使用的数量.
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
# # 在日志组中每个日志文件的大小.
# # 你应该设置日志文件总合大小到你缓冲池大小的25%~100%
# # 来避免在日志文件覆写上不必要的缓冲池刷新行为.
# # 不论如何, 请注意一个大的日志文件大小会增加恢复进程所需要的时间.
innodb_log_file_size = 32M
# # 用来缓冲日志数据的缓冲区的大小.
# # 当此值快满时, InnoDB将必须刷新数据到磁盘上.
# # 由于基本上每秒都会刷新一次,所以没有必要将此值设置的太大(甚至对于长事务而言)
innodb_log_buffer_size = 8M
# # 如果设置为1 ,InnoDB会在每次提交后刷新(fsync)事务日志到磁盘上,
# # 这提供了完整的ACID行为.
# # 如果你愿意对事务安全折衷, 并且你正在运行一个小的食物, 你可以设置此值到0或者2来减少由事务日志引起的磁盘I/O
# # 0代表日志只大约每秒写入日志