# MaxScale documentation: # https://mariadb.com/kb/en/mariadb-maxscale-25/ # Global parameters # # Complete list of configuration options: # https://mariadb.com/kb/en/mariadb-maxscale-25-mariadb-maxscale-configuration-guide/ [maxscale] threads=auto syslog=0 admin_secure_gui = false admin_host = 0.0.0.0 admin_port = 8989 # Specify interface to use when connecting to servers local_address=**REDACTED** debug=gdb-stacktrace # Server definitions # # Set the address of the server to the network # address of a MariaDB server. # # Set rank=secondary to have it as a backup if other primary servers fail # will not have connections assigned unless necessary (no other primary available) [g1sql1] # Preferred primary server type=server address=**REDACTED** port=3306 protocol=MariaDBBackend rank=primary [g1sql2] # Had replication issues. Hopefully resolved. type=server address=**REDACTED** port=3306 protocol=MariaDBBackend rank=primary [g1sql3] # Newly built slave, preferred. type=server address=**REDACTED** port=3306 protocol=MariaDBBackend rank=primary # Monitor for the servers # # This will keep MaxScale aware of the state of the servers. # MariaDB Monitor documentation: # https://mariadb.com/kb/en/maxscale-25-monitors/ [MariaDB-Monitor] type=monitor module=mariadbmon servers=g1sql1,g1sql2,g1sql3 # Do not promote these servers to master #servers_no_promotion=g1sql3 user=**REDACTED** password=**REDACTED** # Use monitor user/pass if replication_user/pass not specified #replication_user=**REDACTED** #replication_password=**REDACTED** monitor_interval=10000 # Set true to allow slave to be promoted to master auto_failover=true failover_timeout=30 # Set true to allow failed master to rejoin as slave auto_rejoin=true failcount=5 verify_master_failure=true master_failure_timeout=2 assume_unique_hostnames=ON enforce_read_only_slaves=ON # Service definitions # # Service Definition for a read-only service and # a read/write splitting service. # # ReadConnRoute documentation: # https://mariadb.com/kb/en/mariadb-maxscale-25-readconnroute/ #[Read-Only-Service] #type=service #router=readconnroute #servers=server1 #user=myuser #password=mypwd #router_options=slave # ReadWriteSplit documentation: # https://mariadb.com/kb/en/mariadb-maxscale-25-readwritesplit/ [Read-Write-Service] type=service router=readwritesplit ##servers=g1sql1,g1sql2 servers=g1sql1,g1sql2,g1sql3 user=**REDACTED** password=**REDACTED** max_sescmd_history=1500 prune_sescmd_history=true master_accept_reads=true # Only required when using multiple MaxScale servers version_string=MaxScale-6-Primary use_sql_variables_in=master connection_timeout=15m # Set to 0 or ommit for no limit on number of connections # Max_Connections will be controlled in the actual servers themselves max_connections = 0 # Listener definitions for the services # # These listeners represent the ports the # services will listen on. # #[Read-Only-Listener] #type=listener #service=Read-Only-Service #protocol=MariaDBClient #port=4008 [Read-Write-Listener] type=listener service=Read-Write-Service protocol=MariaDBClient # Need to specify address in IPv4 format (default assumes IPv6) # Need to specify address when using multiple NICs # Remove address as it was causing listener to fail to startup. # listerner is now listening on both interfaces. #address=**REDACTED** port=4006