How to login or access the Spring Cloud Service 2.x broker database
search cancel

How to login or access the Spring Cloud Service 2.x broker database

book

Article ID: 297156

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction

This article covers how to login and access the SCS 2.x broker database. This is also known as the spring-cloud-broker-db service

Environment

Product Version: 2.1

Resolution

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