MySqlConnector
MySqlConnector copied to clipboard
Support new server connection string option format
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.
When is this feature expected?
+1 for this feature, we have had to use MySql.Data
library instead
@matteus6007 MySqlConnector already supports comma-delimited servers (but not ports or priorities); is that insufficient for your current needs?
@matteus6007 MySqlConnector already supports comma-delimited servers (but not ports or priorities); is that insufficient for your current needs?
different ports for MySQL replset is common, it will be better if multi mysql server with different port can be supported