Connect to an Application DB
How to connect to the underlying database for a deployed application.
For various reasons, you may want to connect to the underlying database for an application. This could be for routine operations, verifying state, or for surgical procedures.
You can list all possible proxies for an application by running:
plural proxy list <app-name>
You can connect directly to the database with the following command:
plural proxy connect <app-name> db
- Choose the application you want to connect to from the Application Overview tab.
- Navigate to the
Componentstab located in the left side bar.
- Click on the component named
- Click on the Pod in the section, likely named
- In the Containers section, where it says
container: postgres, there is a Shell icon to the right of it. Click on it to create a terminal instance.
- Enter the command
su postgres && psqlto access Postgres.