In order to get the benefits of Continuent Tungsten your application must use the VMware Continuent Connector. The connector is compatible with MySQL drivers and applications. Use the tpm connector --samples command to see examples of how you can invoke a connection on your own. You may need to adapt these examples to your application and configuration method but the connection details should be the same.
tpm connector --samplesBash mysql -hconnector1 -P3306 -uappuser -ppassword Perl::dbi $dbh=DBI->connecti('DBI:mysql:host=connector1;port=3306', 'appuser', 'password') PHP::mysqli $dbh = new mysqli('connector1', 'appuser', 'password', 'schema', '3306'); PHP::pdo $dbh = new PDO('mysql:host=connector1;port=3306', 'appuser', 'password'); Python::mysql.connector dbh = mysql.connector.connect(user='appuser', password='password', host='connector1', port=3306, database='schema') Java::DriverManager dbh=DriverManager.getConnection("jdbc:mysql://connector1:3306/schema", "appuser", "password")
After installation the connector will only work with the
--application-password options that were
provided during installation. See Section 6.5, “User Authentication”
if you need more information on adding users to
By default the connection will always be sent to the current master. This behavior can be modified by implementing one of the routing methods to send some traffic to slave datasources.