码迷,mamicode.com
首页 > 数据库 > 详细

二、mysql配置文件模板

时间:2014-12-01 19:28:07      阅读:279      评论:0      收藏:0      [点我收藏+]

标签: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配置文件模板

标签:mysql 配置文件 my.cnf

原文地址:http://4708705.blog.51cto.com/4698705/1585116

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!