多实例MySQL的/etc/my.cnf配置文件
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
[mysqld1]
datadir=/mnt/mysql/3306
socket=/tmp/mysql3306.sock
pid-file=/mnt/mysql/mysql3306.pid
log-error=/mnt/logs/mysql/3306/error.log
#general_log=/mnt/logs/mysql/3306/mysql.log
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
port=3306
server-id=197
log-bin=mysql-bin
skip-external-locking
skip-name-resolve
key_buffer = 256M
max_allowed_packet = 1024M
net_buffer_length = 1M
#table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
ft_min_word_len = 1
query_cache_type = 1
query_cache_size = 64M
read_rnd_buffer_size = 4M
#table_open_cache = 256
thread_concurrency = 4
interactive_timeout=180
wait_timeout=180
long_query_time = 2
log_slow_queries = 1
#slow_query_log_file = /mnt/logs/mysql/3306/slow_query.log
max_connect_errors = 10000
log_bin_trust_function_creators=1
thread_cache_size = 8
innodb_file_per_table
expire_logs_day = 30
#binlog_format=mixed
master-host=42.121.3.42
master-port=3306
master-user=slaverep
master-password=TwirEmU5
#master-connect-retry=60
[mysqld2]
datadir=/mnt/mysql/3307
socket=/tmp/mysql3307.sock
pid-file=/mnt/mysql/mysql3307.pid
log-error=/mnt/logs/mysql/3307/error.log
#general_log=/mnt/logs/mysql/3307/mysql.log
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
port=3307
server-id=115
log-bin=mysql-bin
skip-external-locking
skip-name-resolve
key_buffer = 256M
max_allowed_packet = 1M
#table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
ft_min_word_len = 1
query_cache_type = 1
query_cache_size = 64M
read_rnd_buffer_size = 4M
#table_open_cache = 256
thread_concurrency = 4
interactive_timeout=180
wait_timeout=180
long_query_time = 2
log_slow_queries = 1
#slow_query_log_file = /mnt/logs/mysql/3307/slow_query.log
max_connect_errors = 10000
log_bin_trust_function_creators=1
thread_cache_size = 8
innodb_file_per_table
expire_logs_day = 30
#binlog_format=mixed
master-host=112.124.34.26
master-port=3306
master-user=slaverep
master-password=TwirEmU5
master-connect-retry=60
[mysqld3]
datadir=/mnt/mysql/3308
socket=/tmp/mysql3308.sock
pid-file=/mnt/mysql/mysql3308.pid
log-error=/mnt/logs/mysql/3308/error.log
#general_log=/mnt/logs/mysql/3308/mysql.log
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
port=3308
server-id=116
log-bin=mysql-bin
skip-external-locking
skip-name-resolve
key_buffer = 256M
max_allowed_packet = 1024M
net_buffer_length = 1M
#table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
ft_min_word_len = 1
query_cache_type = 1
query_cache_size = 64M
read_rnd_buffer_size = 4M
#table_open_cache = 256
thread_concurrency = 4
interactive_timeout=180
wait_timeout=180
long_query_time = 2
log_slow_queries = 1
#slow_query_log_file = /mnt/logs/mysql/3308/slow_query.log
max_connect_errors = 10000
log_bin_trust_function_creators=1
thread_cache_size = 8
innodb_file_per_table
expire_logs_day = 30
#binlog_format=mixed
master-host=112.124.7.82
master-port=3306
master-user=slaverep
master-password=TwirEmU5
#master-connect-retry=60
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。