Learn how to connect to a PostgreSQL database instance with one of the world's most famous Open Source management tools for PostgreSQL: pgAdmin.
Managed Databases (also called Cloud Databases) allow you to focus on building and deploying cloud applications while OVHcloud takes care of the database infrastructure and maintenance in operational conditions.
Requirements
- access to the OVHcloud Control Panel
- a Public Cloud project in your OVHcloud account
- a PostgreSQL database running on your OVHcloud Cloud Databases (this guide can help you to meet this requirement)
- configure your PostgreSQL instance to accept incoming connections
- a pgAdmin stable version installed and public network connectivity (Internet)
Concept
A PostgreSQL instance can be managed in multiple ways. One of the easiest, yet powerful, is to use a Command Line Interface (CLI), as shown in our guide: Connect to PostgreSQL with CLI or by using programming languages, such as PHP or Python.
Another way is to interact directly using a management tool for PostgreSQL: pgAdmin.
To do so, we will need to install pgAdmin, configure our Cloud Databases for PostgreSQL instances to accept incoming connections, and finally configure pgAdmin 4.
Instructions
Installation
To interact with your PostgreSQL instance with pgAdmin 4 you need to install it.
Please follow the official pgAdmin to get the latest information.
We are now ready to learn how to connect to our PostgreSQL instance.
Connect with pgAdmin 4
Configuration
Once logged in pgAdmin, from the Servers dashboard view select Add new server
.
In the Create - Server dialog box, in the General
tab, fill in the Name field.
Then select the Connection
tab and fill in the following fields with the collected credentials:
- Host
- Port
- Maintenance database
- Username
- Password
Finally, select the SSL
tab and set the SSL Mode to Require.
Advanced
tab.Once saved, select your server in the servers list on the left. In the Dashboard view, you can observe that the connection is active:
- Backup and Restore a single table, a schema, or a complete database
- Manage Roles
Go further
Visit the GitHub examples repository to find out how to connect to your database with several languages.
For more information and tutorials, please see our other Cloud Databases support guides or explore the guides for other OVHcloud products and services.