| Bug #62079 | ReplicationDriver does not allow different user credentials per server | ||
|---|---|---|---|
| Submitted: | 3 Aug 2011 22:55 | Modified: | 4 Aug 2011 13:32 |
| Reporter: | Tero Paananen | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | Connector / J Documentation | Severity: | S4 (Feature request) |
| Version: | OS: | Any | |
| Assigned to: | CPU Architecture: | Any | |
[3 Aug 2011 22:55]
Tero Paananen
[3 Aug 2011 23:11]
Mark Matthews
This was fixed in 5.1.14, reference the changelog note:
Added support for hosts specified in the URL of the form:
address=(key=value), supported keys are:
(protocol=tcp or pipe (for named pipes on Windows)
(path=[] for named pipes)
(host=[]) for TCP connections
(port=[]) for TCP connections
An example would be:
jdbc:mysql://address=(protocol=tcp)(host=localhost)(port=3306)(user=test)/db
Any other parameters are treated as host-specific properties that follow
the conventions of the JDBC URL properties. This now allows per-host
overrides of any configuration property for multi-host connections
(failover, loadbalance, replication). We do recommend that the overrides
are limited to user, password, network timeouts and statement and
metadata cache sizes. Unexpected behavior may be observed with other
per-host overrides.
In your case, each host would get it's own address=...
[4 Aug 2011 13:32]
Tero Paananen
Thanks Mark, that is working as intended. Shouldn't it be documented somewhere in the docs (other than in changelogs), though? Maybe here: http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html
