MySQL 配置文件模板

# The MySQL server

[mysqld]

port=3306

user=mysqld

socket=/data/mysqldata/3306/mysql.sock

pid-file=/data/mysqldata/3306/mysql.pid

basedir=/usr/local/mysql

datadir=/data/mysqldata/3306/data

tmpdir=/data/mysqldata/3306/tmp

open_files_limit=10240

explicit_defaults_for_timestamp

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

federated

server_id=1

max_connections=1000

max_connect_errors=100000

interactive_timeout=86400

wait_timeout=86400

skip-name-resolve

sync_binlog=0

# Buffer

sort_buffer_size=2m

read_buffer_size=2m

read_rnd_buffer_size=2m

join_buffer_size=2m

net_buffer_length=16k

max_allowed_packet=512m

bulk_insert_buffer_size=32m

max_heap_table_size=512m

tmp_table_size=512m

thread_cache_size=300

query_cache_size=128m

query_cache_limit=1m

query_cache_min_res_unit=4k

key_buffer_size=16m

myisam_sort_buffer_size=64m

myisam_max_sort_file_size=10g

myisam_repair_threads=1

# Log

log-bin=../binlog/mysql-bin

binlog_cache_size=32m

max_binlog_cache_size=64m

binlog_stmt_cache_size=32m

table_open_cache=2048

max_binlog_size=512m

binlog_format=statemaent

log_output=FILE

log-error=../mysql-error.log

slow_query_log=1

slow_query_log_file=../slow_query.log

general_log=0

general_log_file=../general_query.log

expire-logs-days=14

relay-log=../bin/relay-bin

relay-log-index=../binlog/relay-bin.index

# InnoDB

innodb_data_file_path=ibdata1:2048M:autoextend

innodb_log_file_size=128m

innodb_log_files_in_group=3

innodb_buffer_pool_size=9g

innodb_buffer_pool_instances=-1

innodb_max_dirty_pages_pct=70

innodb_thread_concurrency=8

innodb_flush_method=O_DIRECT

innodb_log_buffer_size=16m

innodb_flush_log_at_trx_commit=2

时间: 2024-10-21 00:42:00

MySQL 配置文件模板的相关文章

二、mysql配置文件模板

引用<高性能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/li

Mysql配置文件模板

来自: http://www.fromdual.com/mysql-configuration-file-sample The MySQL and MariaDB default configuration is not very great for production use. Some of the default values in my.cnf should be changed when you need it for business critical applications.

MySQL配置文件mysql.ini参数详解、MySQL性能优化

MySQL配置文件mysql.ini参数详解.MySQL性能优化 my.ini(Linux系统下是my.cnf),当mysql服务器启动时它会读取这个文件,设置相关的运行环境参数. my.ini分为两块:Client Section和Server Section.   Client Section用来配置MySQL客户端参数.   要查看配置参数可以用下面的命令: show variables like '%innodb%'; # 查看innodb相关配置参数 show status like

mysql配置文件my.cnf整理

随时修改: 1 [mysqld] 2 #basedir= 3 datadir=/var/lib/mysql 4 #mysql.default_port=3306 5 #mysql.default_socket=/tmp/mysql.sock 6 socket=/var/lib/mysql/mysql.sock 7 #socket=/tmp/mysql.sock 8 user=mysql 9 # Disabling symbolic-links is recommended to prevent

EF MySql 配置文件

1 <?xml version="1.0" encoding="utf-8"?><!--有关如何配置 ASP.NET 应用程序的详细信息,请访问 2 http://go.microsoft.com/fwlink/?LinkId=169433 3 --> 4 <configuration> 5 <configSections> 6 <!-- For more information on Entity Framew

MySQL 配置文件my.cnf

转载: MySQL配置文件my.cnf 详解: #BEGIN CONFIG INFO#DESCR: 4GB RAM, 只使用InnoDB, ACID, 少量的连接, 队列负载大#TYPE: SYSTEM#END CONFIG INFO ## 此mysql配置文件例子针对4G内存. # 主要使用INNODB#处理复杂队列并且连接数量较少的mysql服务器## 将此文件复制到/etc/my.cnf 作为全局设置,# mysql-data-dir/my.cnf 作为服务器指定设置# (@[email 

linux中查看nginx、apache、php、mysql配置文件路径的方法

转自:http://www.phper163.com/archives/368 如何在linux中查看nginx.apache.php.mysql配置文件路径了,如果你接收一个别人配置过的环境,但没留下相关文档.这时该怎么判断找到正确的加载文件路径了.可以通过以下来判断1.判断apache首先执行命令找到httpd路径ps aux | grep httpd如httpd路径为 /usr/local/apache/bin/httpd然后执行以下命令/usr/local/apache/bin/http

Nginx 配置文件模板

user www www; worker_processes 2; error_log /usr/local/nginx/logs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 51200; events { us

ssh框架中spring整合hibernate的配置文件模板(带详细注释)

applicationContext.xml的配置文件模板 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans 3 xmlns="http://www.springframework.org/schema/beans" 4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 5 xmlns:aop=&quo