I want to connect my PostgreSQL service instance to my local PgAdmin For rapid development on my local machine.
Please provide the steps how I can connect my Mindsphere PostgreSQL service Instance to my local PgAdmin instance?
SolutionPlease follow the below steps to connect and manage the PostgreSQL service instance locally.
Note:
Step 1: Get application environment info and take note of host, name, username, password
to get environment info of the app command: cf env {app_name}
Step 2: Connect by ssh command:
cf ssh {app_name} -L {local_port}:{host}:{port} for example: $ cf ssh postgresql-app -L 5433:d67901c.service.dc1.a9svs:5432
Step 3: Now open the PgAdmin application server on your machine/PC.
Step 4: Create a local server to connect and manage the database.
Step 5: Enter name in the general tab of "create server".
Provide host name, port number maintenance database, username, and password (which you already received from the application environment variable in step 1). Please refer to below screenshot, then click on save.
Now you can use your PostgreSQL service in your local PgAdmin.
Notes
For any questions or support in this matter, contact us through the support centre.
For additional information regarding how to make a service instance locally available, please visit following URL:
Notes