程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> mysql 安裝innodb服務器

mysql 安裝innodb服務器

編輯:關於MYSQL數據庫

# Example MySQL config file for medium systems. # This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server) # You can copy this file to
# /etc/my.cnf to set global options,
# MySQL-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/MySQL) or
# ~/.my.cnf to set user-specific options. # In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clIEnts
[clIEnt]
port            = 3306
socket          = /data/var/MySQL.sock
# Here follows entrIEs for some specific programs

# The MySQL Server
[MySQLd]
port            = 3306
socket          = /data/var/MySQL.sock
skip-locking
skip-external-locking
skip-slave-start

#key_buffer_size = 2M
read_buffer_size=4M
sort_buffer_size=4M
table_cache=4096
max_allowed_packet = 16M

#net_buffer_length = 8K
#read_rnd_buffer_size = 512K

default-storage-engine=InnoDB
default-character-set=utf8
default-collation=utf8_bin

character_set_server=utf8
collation_server=utf8_bin
init-connect='SET NAMES utf8'

max_connection=2000
binlog_cache_size=2M
#sort_buffer_size=16M
#join_buffer_size=16M
#thread_cache_size=8

#cpu * (2..4)
thread_concurrency=32

query_cache_size = 256M
query_cache_limit = 2M
default_table_type = INNODB

#READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE
transaction_isolation = READ-COMMITTED
set-variable    = tmp_table_size=256M

#--------log---------
log_slow_querIEs
long_query_time = 1
log_long_format

#--------replication---------
log-bin=fb-bin
#last intranet ip
server-id = 19885
datadir=/data/var
#--------innodb--------------
innodb_data_home_dir = /data/ibdata
innodb_autoextend_increment = 256M
innodb_data_file_path=ibdata1:10M;ibdata2:10M:autoextend
innodb_table_locks = 0
innodb_lock_wait_timeout = 10

#(50-80)% * total memory ( 5G )
innodb_buffer_pool_size= 1G
innodb_additional_mem_pool_size=64M
innodb_file_io_thread= 4

#innodb_thread_concurrency = 16
innodb_log_group_home_dir = /data/iblogs
innodb_log_files_in_group = 2
innodb_log_arch_dir = /data/iblogs
innodb_flush_log_at_trx_commit = 0
sync_binlog=15
innodb_support_xa=0
innodb_file_per_table=1

innodb_log_file_size = 1G #25% *buffer pool size (1G)
innodb_log_buffer_size = 32M
#innodb_flush_log_at_trx_commit = 0
#innodb_thread_concurrency=5

#-----------------------------
# hdparm -W0 /dev/hda 1??hda éμ?write cache

# Set key_buffer to 5 - 50% of your RAM depending on how much
# you use MyISAM tables, but keep key_buffer_size + InnoDB
# buffer pool size < 80% of your RAM
#key_buffer_size=value

#master-host     =   kings # The username the slave will use for authentication when connecting
# to the master - required # The passWord the slave will authenticate with when connecting to
# the master - required

#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     = <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 BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# Uncomment the following if you are using InnoDB tables
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/MySQL/
#innodb_log_arch_dir = /var/lib/MySQL/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#sync_binlog=1
#innodb_lock_wait_timeout = 50

[MySQLdump]
quick
max_allowed_packet = 16M

[MySQL]
no-auto-rehash

default-character-set=utf8
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[MySQLhotcopy]

-
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved