mysql 配置文件模板_mysql配置文件模板

[client]

port = 3306

socket = /tmp/mysql.sock

# The MySQL server

[mysqld]

# Basic

#skip-grant-tables

port = 3306

user = mysql

basedir = /usr/local/mysql

datadir = /data/mysql/data

tmpdir = /data/mysql/tmp

socket = /tmp/mysql.sock

log-bin = /data/mysql/logs/mysql-bin

log-error = error.log

slow-query-log-file = slow.log

skip-external-locking

skip-name-resolve

log-slave-updates

explicit_defaults_for_timestamp=true

server-id =10001

character-set-server = utf8

slow-query-log

binlog_format = mixed

max_binlog_size = 128M

binlog_cache_size = 1M

expire-logs-days = 5

back_log = 500

long_query_time=1

#lower_case_table_name=1

max_connections=1100

max_user_connections=1000

max_connect_errors=1000

wait_timeout=14400

interactive_timeout=100

connect_timeout = 20

slave-net-timeout=30

max-relay-log-size = 256M

relay-log = relay-bin

transaction_isolation = READ-COMMITTED

performance_schema=0

#myisam_recover

key_buffer_size = 64M

max_allowed_packet = 16M

#table_cache = 3096

table_open_cache = 6144

table_definition_cache = 4096

sort_buffer_size = 128K

read_buffer_size = 1M

read_rnd_buffer_size = 1M

join_buffer_size = 128K

myisam_sort_buffer_size = 32M

tmp_table_size = 32M

max_heap_table_size = 64M

query_cache_type=0

query_cache_size = 0

bulk_insert_buffer_size = 32M

thread_cache_size = 64

#thread_concurrency = 32

thread_stack = 192K

skip-slave-start

# InnoDB

innodb_data_home_dir = /data/mysql/data

innodb_log_group_home_dir = /data/mysql/logs

innodb_data_file_path = ibdata1:1G:autoextend

innodb_buffer_pool_size = 1G

innodb_buffer_pool_instances = 8

#innodb_additional_mem_pool_size = 16M

innodb_log_file_size = 200M

innodb_log_buffer_size = 16M

innodb_log_files_in_group = 3

innodb_flush_log_at_trx_commit = 0

innodb_lock_wait_timeout = 10

innodb_sync_spin_loops = 40

innodb_max_dirty_pages_pct = 90

innodb_support_xa = 0

innodb_thread_concurrency = 0

innodb_thread_sleep_delay = 500

innodb_file_io_threads = 4

innodb_concurrency_tickets = 1000

log_bin_trust_function_creators = 1

innodb_flush_method = O_DIRECT

innodb_file_per_table

innodb_read_io_threads = 16

innodb_write_io_threads = 16

innodb_io_capacity = 2000

innodb_file_format = Barracuda

innodb_purge_threads=1

innodb_purge_batch_size = 32

innodb_old_blocks_pct=75

innodb_change_buffering=all

innodb_stats_on_metadata=OFF

[mysqldump]

quick

max_allowed_packet = 128M

#myisam_max_sort_file_size = 10G

[mysql]

no-auto-rehash

max_allowed_packet = 128M

prompt = '(product)\u@\h [\d]> '

default_character_set = utf8

[myisamchk]

key_buffer_size = 64M

sort_buffer_size = 512k

read_buffer = 2M

write_buffer = 2M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

#malloc-lib= /usr/local/mysql/lib/mysql/libjemalloc.so

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值