博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
多实例MySQL的/etc/my.cnf配置文件
阅读量:5122 次
发布时间:2019-06-13

本文共 4657 字,大约阅读时间需要 15 分钟。

[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

 

[danny@s7 ~]$ cat /usr/local/mysql55/my.cnf

[mysqld]
port=3307
datadir=/usr/local/mysql55/data
socket=/tmp/mysql.sock
user=mysql
log-bin = mysql-bin
server-id=1170
#master-host=112.124.34.26
#master-port=3306
#master-user=slave
#master-password=TwirEmU5
#relay_log =//usr/local/mysql55/data/mysql55-relay-bin
log_slave_updates =1
read_only =1
slave-skip-errors=1007,1008,1053,1062,1213,1158,1159,1032,1146
skip-external-locking
skip-name-resolve
interactive_timeout=180
wait_timeout=180
max_connect_errors = 10000
log_bin_trust_function_creators=1
thread_cache_size = 8
innodb_file_per_table
binlog_format=mixed
expire_logs_day = 30
# Disabling symbolic-links is recommended to prevent assorted security risks
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld55.log
pid-file=/usr/local/mysql55/data/s7.pid
default-character-set=utf8
log = /var/log/mysqld55_general.log

转载于:https://www.cnblogs.com/chromebook/p/4014010.html

你可能感兴趣的文章
django高级应用(分页功能)
查看>>
【转】Linux之printf命令
查看>>
关于PHP会话:session和cookie
查看>>
STM32F10x_RTC秒中断
查看>>
display:none和visiblity:hidden区别
查看>>
C#double转化成字符串 保留小数位数, 不以科学计数法的形式出现。
查看>>
SpringMVC学习总结(三)——Controller接口详解(1)
查看>>
牛的障碍Cow Steeplechase
查看>>
Zookeeper选举算法原理
查看>>
3月29日AM
查看>>
利用IP地址查询接口来查询IP归属地
查看>>
HTML元素定义 ID,Class,Style的优先级
查看>>
构造者模式
查看>>
http和https的区别
查看>>
Hbuild在线云ios打包失败,提示BuildConfigure Failed 31013 App Store 图标 未找到 解决方法...
查看>>
找到树中指定id的所有父节点
查看>>
今天新开通了博客
查看>>
AS3优化性能笔记二
查看>>
Java高阶回调,回调函数的另一种玩法
查看>>
ElasticSearch(站内搜索)
查看>>