-
Notifications
You must be signed in to change notification settings - Fork 1
/
proxysql.cnf
73 lines (68 loc) · 1.61 KB
/
proxysql.cnf
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
datadir="/var/lib/proxysql"
admin_variables =
{
admin_credentials="admin:admin;radminuser:radminpass"
mysql_ifaces="0.0.0.0:6032"
refresh_interval=2000
}
mysql_variables=
{
threads=2
max_connections=2048
default_query_delay=0
default_query_timeout=10000
poll_timeout=2000
interfaces="0.0.0.0:3306"
default_schema="information_schema"
stacksize=1048576
connect_timeout_server=10000
monitor_history=60000
monitor_connect_interval=20000
monitor_ping_interval=10000
ping_timeout_server=200
commands_stats=true
sessions_sort=true
}
mysql_servers =
(
{
address="mysqlprimary"
port=3306
hostgroup=0
max_connections=200
},
{
address="mysqlreplica"
port=3306
hostgroup=1
max_connections=200
}
)
mysql_users:
(
{
username = "root"
password = "password"
default_hostgroup = 0
max_connections=1000
default_schema="information_schema"
active = 1
}
)
mysql_query_rules:
(
{
rule_id=1
active=1
match_pattern="^SELECT .* FOR UPDATE$"
destination_hostgroup=0
apply=1
},
{
rule_id=2
active=1
match_pattern="^SELECT"
destination_hostgroup=1
apply=1
}
)