mysql配置文件my-small.cnf解析,汉文翻译,配置
#ExampleMySQLconfigfileforsmallsystems.
#数据库最小系统配置文件样例
#Thisisforasystemwithlittlememory(<=64M)whereMySQLisonlyused#fromtimetotimeandit'simportantthatthemysqlddaemon#doesn'tusemuchresources.
#这个配置时为内存比较小的系统且数据库不连续使用的系统设置的,
#最重要的时它的后台服务几乎不会使用太多资源
#MySQLprogramslookforoptionfilesinasetof#locationswhichdependonthedeploymentplatform.#Youcancopythisoptionfiletooneofthose#locations.Forinformationabouttheselocations,see:#http://dev.mysql.com/doc/mysql/en/option-files.html
#数据库程序寻找调度平台可以调度的一些位置的选项文件。
#你可以把选项文件复制到这些位置
#Inthisfile,youcanusealllongoptionsthataprogramsupports.#Ifyouwanttoknowwhichoptionsaprogramsupports,runtheprogram#withthe"--help"option.
#在这个文件中,你可以使用程序支持的所有长选项。
#如果你想只知道程序支持哪个选项,运行程序查找帮助
#ThefollowingoptionswillbepassedtoallMySQLclients
#下列选项应用到数据库的客户端
[client]#password=your_password#密码port=3306#端口socket=/tmp/mysql.sock#socket位置
#Herefollowsentriesforsomespecificprograms
#接下来的条目是为一些特别程序准备的
#TheMySQLserver[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'tlistenonaTCP/IPportatall.Thiscanbeasecurityenhancement,#ifallprocessesthatneedtoconnecttomysqldrunonthesamehost.#AllinteractionwithmysqldmustbemadeviaUnixsocketsornamedpipes.#NotethatusingthisoptionwithoutenablingnamedpipesonWindows#(usingthe"enable-named-pipe"option)willrendermysqlduseless!##skip-networkingserver-id=1
#不要一直监听一个tcp/ip端口。如果所有进程需要连接到相同主机数据库后台,那么这个是安全加强项。
#和数据库后台的所有交互必须经过Unix code或命名管道。
#注意如果windows没有激活相应选项(enable-named-pipe),这个选项是无效的。
#Uncommentthefollowingifyouwanttologupdates#日志更新#log-bin=mysql-bin
#binaryloggingformat-mixedrecommended#binlog_format=mixed
# 二进制混合格式日志记录
#Causesupdatestonon-transactionalenginesusingstatementformattobe#writtendirectlytobinarylog.Beforeusingthisoptionmakesurethat#therearenodependenciesbetweentransactionalandnon-transactional#tablessuchasinthestatementINSERTINTOt_myisamSELECT*FROM#t_innodb;otherwise,slavesmaydivergefromthemaster.#binlog_direct_non_transactional_updates=TRUE
#更新到非事务引擎使用说明格式写到二进制日志中,
#使用这个选项之前确保依赖在事务和非事务表
#例如:插入数据。否则,备机和主机背道而驰。
#UncommentthefollowingifyouareusingInnoDBtables#是否使用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#Youcanset.._buffer_pool_sizeupto50-80%#ofRAMbutbewareofsettingmemoryusagetoohigh#innodb_buffer_pool_size=16M#innodb_additional_mem_pool_size=2M#Set.._log_file_sizeto25%ofbufferpoolsize#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
#修改为自动补全 只能提示表名和表里面字段名
#RemovethenextcommentcharacterifyouarenotfamiliarwithSQL#安全更新#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
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。