Open
Description
Connector/NET 8.0.19 introduces a new format for the Server
connection string option:
// Example with priority
server=(address=192.10.1.52:3305,priority=60),(address=localhost:3306,priority=100);
// Example without priority and with multiple ports
host=10.10.10.10:3306,192.101.10.2:3305,localhost:3306;uid=test;password=xxxx;
Specifying multiple hosts with the same priority is equivalent to LoadBalance.Random
; specifying different priorities is equivalent to LoadBalance.FailOver
(in descending order of priority).
This is a superset of MySqlConnector's current multiple-server option, because a) a port can be specified for each server; b) a mix of Failover
and Random
behaviour can be obtained by specifying different or the same priority values.
It appears that address
and priority
must appear in exactly that order, and that priority
must be specified for all or no hosts.