10.5.5. tpm connector Command

This will open a MySQL CLI connection to the local Tungsten Connector using the current values for --application-user, --application-password and --application-port.

shell> tpm connector

Warning

This command will fail if the mysql utility is not available or if the local server does not have a running Tungsten Connector.

Important

The MySQL 5.7/8.0 command-line client will now attempt to connect via SSL by default, which will fail on the Connector unless it is configured for SSL operations. You may add the --skip-ssl option to bypass this issue. See Section 5.13.3, “Configuring Connector SSL” for more information about using SSL with the Connector.

10.5.5.1. tpm connector --hosts Command

Limits the connection to the list of specified hosts. For example:

shell> tpm connector --hosts host1,host2

Would limit the connection to the connector on one of the specified hosts. The hostname must be specified in the same form as it is in the configuration.

10.5.5.2. tpm connector --dataservice-name Command

Limit the command to the hosts in the specified dataservice. Mutliple dataservices can be specified by providing each dataservice separated by a comman.

shell> tpm connector --dataservice-name east

10.5.5.3. tpm connector --samples Command

Provides sample configuration information for various common development environments:

shell> tpm connector --samples
Bash                          mysql -hdemo-c11 -P3306 -uapp_user -ppassword
Perl::dbi                     $dbh=DBI->connecti('DBI:mysql:host=demo-c11;port=3306', 'app_user', 'password')
PHP::mysqli                   $dbh = new mysqli('demo-c11', 'app_user', 'password', 'schema', '3306');
PHP::pdo                      $dbh = new PDO('mysql:host=demo-c11;port=3306', 'app_user', 'password');
Python::mysql.connector       dbh = mysql.connector.connect(user='app_user', password='password', host='demo-c11', port=3306, database='schema')
Java::DriverManager           dbh=DriverManager.getConnection("jdbc:mysql://demo-c11:3306/schema", "app_user", "password")