MySQL Utilities 1.4 Manual  /  ...  /  Loading the Driver and Requesting a Fabric Connection

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:

  • com.mysql.fabric.jdbc.FabricMySQLConnection: JDBC3 interface, compatible with Java 5 and later

  • com.mysql.fabric.jdbc.JDBC4FabricMySQLConnection: JDBC4 interface, compatible with Java 6 and later. This interface must be used to access JDBC4 APIs on the connection.

Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
EPUB - 292.9Kb
HTML Download (TGZ) - 224.3Kb
HTML Download (Zip) - 236.0Kb
User Comments
Sign Up Login You must be logged in to post a comment.