mysql 多实例配置

[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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值