To login and access the spring-cloud-broker-db service, follow these steps.
Note: ADMIN permission is required.
1. Retrieve the service-instance GUID from the SCS-broker-db.
$ cf target -o system -s p-spring-cloud-services && cf service spring-cloud-broker-db --guid
2. ssh to the Ops Manager, then bosh ssh to the MySQL service-instance database.
$ ssh ubuntu@<opsmgr-domain> $ export BOSH_CLIENT=ops_manager BOSH_CLIENT_SECRET=<my-secret> BOSH_CA_CERT=<my-bosh-ca-cert-path-file> BOSH_ENVIRONMENT=<my-bosh-env-ip> bosh $ bosh -d service-instance_<GUID> ssh mysql/0
3. Start the mysql CLI with this command:
$ mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf
4. Target the database instance.
mysql > use service_instance_db
5. Execute SQL statements.
mysql> select service_instance_id, status, organization_guid, space_guid from service_instances;
6. Lastly, exit the MySQL prompt.
mysql> quit
Related articles