8.9.2 Loading the Driver and Requesting a Fabric Connection

When using Connector/J with MySQL Fabric, you must provide the host name and port of the MySQL Fabric server instead of the database server. The connection string must follow the same form it normally does, with the addition of the fabric keyword, as follows:


The user name and password provided to the connection are used for authentication with the individual database servers. Fabric authentication parameters can be given in the URL using the fabricUsername and fabricPassword properties. e.g.


If the username and password to authenticate to the Fabric node are omitted, no authentication is used. This should only be done when authentication has been disabled on the Fabric node.


If you are using Java 5, you must manually load the driver class before attempting to connect.


Connection now proceeds normally.

Connection conn = DriverManager.getConnection(

To use the Connector/J APIs that support MySQL Fabric, you must cast the Connection object to the public interface that provides the necessary methods. The interfaces are: