This topic provides instructions for tool developers to use for access to their VMware SQL with MySQL for Tanzu Application Service databases.
You can access your VMware Tanzu for MySQL databases by using the following tools:
The MySQLWeb app provides a web UI for managing VMware Tanzu for MySQL databases. The free app lets you view and operate on tables, indexes, constraints, and other database structures, and directly run SQL commands.
You can run the MySQLWeb app in the following ways:
If you deploy MySQLWeb to Ops Manager, you can configure it in the deployment manifest to automatically bind to a specific service instance.
See the MySQLWeb code repo for how to install and run MySQLWeb.
To connect to your VMware Tanzu for MySQL databases from a command line, use the cf CLI MySQL plug-in. The plug-in lets you:
To install the cf CLI MySQL plug-in, run the following:
$ cf install-plugin -r "CF-Community" mysql-plugin
For more information, see the cf-mysql-plugin repository.
You can connect your VMware Tanzu for MySQL databases to a desktop tool. For example, MySQL Workbench or Sequel Pro, if you have the credentials for your MySQL service instance.
If you do not have credentials for your MySQL service instance, follow the procedure in Create Read-only Access Credentials.
To connect your databases to a desktop tool do the following:
To retrieve the credentials from your MySQL service instance service key, run the following command:
cf service-key SERVICE-INSTANCE MYSQL-SERVICE-KEY
Where:
SERVICE-INSTANCE
is the name of your service instance.KEY-NAME
is the name of your service key.For example:
$ cf service-key mydb mykey1
{ "credentials": { "hostname": "72c66633-8a60-466a-8f8a-8beee5e548b8.mysql.service.internal", "jdbcUrl": "jdbc:mysql://72c66633-8a60-466a-8f8a-8beee5e548b8.mysql.service.internal:3306/service_instance_db?user=6bf07ae455a14064a9073cec8696366c\u0026password=a22aaa2a2a2aaaaa\u0026=true", "name": "service\_instance\_db", "password": "a22aaa2a2a2aaaaa", "port": 3306, "uri": "mysql://6bf07ae455a14064a9073cec8696366c:a22aaa2a2a2aaaaa@72c66633-8a60-466a-8f8a-8beee5e548b8.mysql.service.internal:3306/service_instance_db?reconnect=true", "username": "6bf07ae455a14064a9073cec8696366c" } }
CautionThis procedure assumes you are using cf CLI v8 or greater. Earlier cf CLI versions do not include the top-level
credentials
JSON key in theircf service-key
response.
Record the values for the following:
hostname
name
password
port
username
Configure an SSH tunnel using the values for hostname
and port
that you recorded in the previous step. For information on configuring an SSH tunnel, see Configure your SSH tunnel.
Configure a connection in your desktop tool using the values for hostname
, name
, password
, port
, and username
that you recorded in the previous step.