-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathks1.yaml
More file actions
88 lines (69 loc) · 2.19 KB
/
Copy pathks1.yaml
File metadata and controls
88 lines (69 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# server listen addr
addr : 0.0.0.0:9696
# server user and password
user : kingshard
password : kingshard
# if set log_path, the sql log will write into log_path/sql.log,the system log
# will write into log_path/sys.log
#log_path : /Users/flike/log
# log level[debug|info|warn|error],default error
log_level : info
# if set log_sql(on|off) off,the sql log will not output
log_sql: on
# only log the query that take more than slow_log_time ms
#slow_log_time : 100
# the path of blacklist sql file
# all these sqls in the file will been forbidden by kingshard
#blacklist_sql_file: /Users/flike/blacklist
# only allow this ip list ip to connect kingshard
#allow_ips: 127.0.0.1
# the charset of kingshard, if you don't set this item
# the default charset of kingshard is utf8.
#proxy_charset: gbk
# node is an agenda for real remote mysql server.
nodes :
-
name : mysql1
# default max conns for mysql server
max_conns_limit : 32
# all mysql in a node must have the same user and password
user : root
password : 123456
# master represents a real mysql master server
master : mysql1:3306
# slave represents a real mysql salve server,and the number after '@' is
# read load weight of this slave.
#slave : 192.168.59.101:3307@2,192.168.59.101:3307@3
down_after_noalive : 32
-
name : mysql2
# default max conns for mysql server
max_conns_limit : 32
# all mysql in a node must have the same user and password
user : root
password : 123456
# master represents a real mysql master server
master : mysql2:3306
# slave represents a real mysql salve server,and the number after '@' is
# read load weight of this slave.
#slave : 192.168.59.101:3307@2,192.168.59.101:3307@3
down_after_noalive : 32
# schema defines sharding rules, the db is the sharding table database.
schema :
db : kingshard
nodes: [mysql1,mysql2]
default: mysql1
shard:
-
table: test_shard_hash
key: id
nodes: [mysql1,mysql2]
type: hash
locations: [4,4]
-
table: test_shard_range
key: id
type: range
nodes: [mysql1,mysql2]
locations: [4,4]
table_row_limit: 10000