Bug #65365 ReplicationDriver can't connect to databases with different names

Submitted: 18 May 2012 17:52 Modified: 5 Jun 2012 9:59
Reporter: Tero Paananen Email Updates:
Status: Verified Impact on me:
None 
Category:Connector / J Severity:S4 (Feature request)
Version:8.0.x,5.1.x OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[18 May 2012 17:52] Tero Paananen
Description:
If master/slave replication is set up with the replicate-rewrite-db option causing the slaves to have different database names than on the master, the ReplicationDriver can not be used to correctly connect to these renamed databases on the slaves.

jdbc:mysql:replication://master,slave1,slave2,slave3/test,test_renamed,test_renamed,test_renamed

or

jdbc:mysql:replication://address=(protocol=tcp)(host=master)(database=test),address=(protocol=tcp)(host=slave1)(database=test_renamed),address=(protocol=tcp)(host=slave2)(database=test_renamed),address=(protocol=tcp)(host=slave3)(database=test_renamed)

is not supported.

Therefore accessing a master/slave setup like this is not possible using the ReplicationDriver.

Is there a workaround beyond creating separate datasources in your application?

How to repeat:
Set up master/slave replication with the replicate-rewrite-db option and make sure the database being replicated is renamed on the slave.

Alternatively, for debugging purposes, create the identical databases on two servers, rename one of the databases.

Then try accessing the differently named databases with the ReplicationDriver.
[5 Jun 2012 9:59] Valeriy Kravchuk
Thank you for the feature request.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.