tpm connector
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
This command will fail if the mysql utility is not available or if the local server does not have a running Tungsten Connector.
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 "Configuring Connector SSL" for more information about using SSL with the Connector.
tpm connector --hosts
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.
tpm connector --dataservice-name
Limit the command to the hosts in the specified dataservice. Multiple dataservices can be specified by providing each dataservice separated by a comma.
shell> tpm connector --dataservice-name east
tpm connector --samples
Provides sample configuration information for various common development environments:
shell> tpm connector --samples
Bash -
mysql -hdb1 -P3306 -uapp_user -p'PASSWORD_OBFUSCATED'
Perl::dbi -
$dbh = DBI->connecti('DBI:mysql:host=db1;port=3306', 'app_user', 'PASSWORD_OBFUSCATED')
PHP::mysqli -
$dbh = new mysqli('db1', 'app_user', 'PASSWORD_OBFUSCATED', 'schema', '3306');
PHP::pdo -
$dbh = new PDO('mysql:host=db1;port=3306', 'app_user', 'PASSWORD_OBFUSCATED');
Python::mysql.connector -
dbh = mysql.connector.connect(user='app_user', password='PASSWORD_OBFUSCATED', host='db1', port=3306, database='schema')
Java::DriverManager -
dbh=DriverManager.getConnection("jdbc:mysql://db1:3306/schema", "app_user", 'PASSWORD_OBFUSCATED')
tpm connector -
/usr/bin/mysql --user=app_user --password='PASSWORD_OBFUSCATED' --host=db1 --port=3306