Pivotal Cloud Foundry® (PCF)
This article discusses how to connect to PCF Elastic Runtime internal MySQL database. PCF uses this database to store information for UAADB, Apps Manager DB, CCDB, App Usage Events DB, Autoscaling, and Notifications.
Follow the steps below within the Elastic Runtime Tile of Ops Manager:
For versions 1.11 and lower:
- Depending on your configuration, you can connect directly to one of the many nodes in the cluster and not the proxy node. Select the
Statustab and retrieve the IP from the specific
- Select the
Credentialstab and retrieve the
Mysql Admin Credentialsfrom
- SSH into Ops Manager or a VM that has direct access to the MySQL DB Node and has the MySQL client installed.
- Run the following command
mysql -h <ip> -u root -pwhere the IP is retrieved from step 1 above. The password will be prompted after you select enter.
For versions 1.12 and higher:
- Connect to one of the MySQL VM's by BOSH CLI: bosh ssh mysql/0
- Type the following command to start mysql with credentials sourced from mylogin.cnf: mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf
Here are a few popular MySQL commands:
- To list database type the following command at MySQL prompt:
mysql> show databases; (this displays database)
- To use the database and to enlist the available tables type, here are two commands:
mysql> use MySQL;
mysql> show tables;
Also, link to the bootstrap docs as they instruct you to run commands to check the status of the cluster.