[maxscale]
threads=###threads###
log_warning=1

# Normal usage, should replace SELECT 123 with SELECT 0
[regex1]
type=filter
module=regexfilter
match=SELECT [1-5]*
replace=SELECT 0

[Read Connection Router 1]
type=service
router=readconnroute
servers=server1,server2,server3,server4
user=maxskysql
passwd=skysql
filters=regex1

[Read Connection Listener 1]
type=listener
service=Read Connection Router 1
protocol=MySQLClient
port=4006

# Test with a username, should not match
[regex2]
type=filter
module=regexfilter
match=SELECT [1-5]*
replace=SELECT 0
user=bad_username

[Read Connection Router 2]
type=service
router=readconnroute
router_options=slave
servers=server1,server2,server3,server4
user=maxskysql
passwd=skysql
filters=regex2

[Read Connection Listener 2]
type=listener
service=Read Connection Router 2
protocol=MySQLClient
port=4008

# Test with a hostname, should not match
[regex3]
type=filter
module=regexfilter
match=SELECT [1-5]*
replace=SELECT 0
source=127.0.0.1

[Read Connection Router 3]
type=service
router=readconnroute
router_options=master
servers=server1,server2,server3,server4
user=maxskysql
passwd=skysql
filters=regex3

[Read Connection Listener 3]
type=listener
service=Read Connection Router 3
protocol=MySQLClient
port=4009

[MySQL Monitor]
type=monitor
module=mysqlmon
###repl51###
servers= server1,server2,server3,server4
user=maxskysql
passwd=skysql
monitor_interval=1000

[server1]
type=server
address=###node_server_IP_1###
port=###node_server_port_1###
protocol=MySQLBackend

[server2]
type=server
address=###node_server_IP_2###
port=###node_server_port_2###
protocol=MySQLBackend

[server3]
type=server
address=###node_server_IP_3###
port=###node_server_port_3###
protocol=MySQLBackend

[server4]
type=server
address=###node_server_IP_4###
port=###node_server_port_4###
protocol=MySQLBackend

[CLI]
type=service
router=cli

[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
socket=default
