您的位置:首页 > 数据库 > MySQL

mysql 多实例配置

2016-03-18 18:15 573 查看
[mysqld_multi]

mysqld = /usr/local/mysql/bin/mysqld_safe

mysqladmin = /usr/local/mysql/bin/mysqladmin

user = root

[mysqld1]

socket = /tmp/mysql.sock

port = 3306

pid-file = /var/mysqld3307/1.pid

datadir = /www/mysql

log = /var/mysqld3307/1.log

user = mysql

[mysqld2]

socket = /tmp/mysql3307.sock

port = 3307

pid-file = /var/mysqld3307/2.pid

datadir = /www/www.fstz.org/mysql

log = /var/mysqld3307/2.log

user = mysql

mysqld_multi --defaults-extra-file=/etc/my_mul.cnf start 1,2

mysqld_safe --defaults-file=/etc/my3308.cnf

--user=mysql --basedir=/usr/local/mysql --datadir=/www/www.fstz.org/mysql

netstat -ntlp

[client]

port = 3307

socket = /tmp/mysql3307.sock

[mysqld]

datadir=/www/www.fstz.org/mysql/

skip-name-resolve

lower_case_table_names=1

innodb_file_per_table=1

port = 3307

socket =/tmp/mysql3307.sock

back_log = 50

max_connections = 300

max_connect_errors = 1000

table_open_cache = 2048

max_allowed_packet = 16M

binlog_cache_size = 2M

max_heap_table_size = 64M

sort_buffer_size = 2M

join_buffer_size = 2M

thread_cache_size = 64

thread_concurrency = 8

query_cache_size = 64M

query_cache_limit = 2M

ft_min_word_len = 4

default-storage-engine = innodb

thread_stack = 192K

transaction_isolation = REPEATABLE-READ

tmp_table_size = 64M

log-bin=mysql-bin

binlog_format=mixed

slow_query_log

long_query_time = 1

server-id = 1

key_buffer_size = 8M

read_buffer_size = 2M

read_rnd_buffer_size = 2M

bulk_insert_buffer_size = 64M

myisam_sort_buffer_size = 128M

myisam_max_sort_file_size = 10G

myisam_repair_threads = 1

myisam_recover

innodb_additional_mem_pool_size = 16M

innodb_buffer_pool_size = 200M

innodb_data_file_path = ibdata1:10M:autoextend

innodb_file_io_threads = 8

innodb_thread_concurrency = 16

innodb_flush_log_at_trx_commit = 1

innodb_log_buffer_size = 16M

innodb_log_file_size = 512M

innodb_log_files_in_group = 3

innodb_max_dirty_pages_pct = 60

innodb_lock_wait_timeout = 120

[mysqldump]

quick

max_allowed_packet = 256M

[mysql]

no-auto-rehash

prompt=\\u@\\d \\R:\\m>

[myisamchk]

key_buffer_size = 512M

sort_buffer_size = 512M

read_buffer = 8M

write_buffer = 8M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

open-files-limit = 8192

pid-file=/home/mysql/mysql_3302/mysqld.pid
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: