-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathproxysql.cnf
More file actions
112 lines (103 loc) · 1.6 KB
/
proxysql.cnf
File metadata and controls
112 lines (103 loc) · 1.6 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
datadir="/tmp"
admin_variables =
{
admin_credentials="admin:admin"
mysql_ifaces="0.0.0.0:6032"
refresh_interval=2000
debug=true
}
mysql_variables =
{
monitor_username="proxysql"
monitor_password="monitor"
monitor_connect_interval=2000
monitor_ping_interval=2000
monitor_read_only_interval=2000
}
mysql_servers =
(
{
hostgroup=1
address="primary"
port=3306
},
{
hostgroup=2
address="replica1"
port=3306
},
{
hostgroup=2
address="replica2"
port=3306
}
)
proxysql_servers =
(
{
hostname="proxysql1"
port=6032
weight=0
comment="proxysql1"
},
{
hostname="proxysql2"
port=6032
weight=0
comment="proxysql2"
},
{
hostname="proxysql3"
port=6032
weight=0
comment="proxysql3"
}
)
mysql_users =
(
{
username = "pl_rewrite"
password = "perconalive"
default_hostgroup = 1
default_schema="perconalive"
active = 1
},
{
username = "pl_mirror"
password = "perconalive"
default_hostgroup = 3
default_schema="perconalive"
active = 1
}
)
mysql_replication_hostgroups =
(
{
writer_hostgroup=1
reader_hostgroup=2
}
)
mysql_query_rules =
(
{
rule_id=1
username="pl_rewrite"
match_pattern="^SELECT .* FOR UPDATE"
destination_hostgroup=1
active=1
},
{
rule_id=2
username="pl_rewrite"
match_pattern="^SELECT .*"
destination_hostgroup=2
active=1
},
{
rule_id=3
username="pl_mirror"
destination_hostgroup=3
mirror_hostgroup=4
active=1
}
)