Connect to your PostgreSQL server instance using pgAdmin > right-click on ‘Group Roles’ and select ‘New Group Role’.
- PgAdmin – a web-based front-end to PostgreSQL database server. 1) Connect to PostgreSQL database server using psql psql is an interactive terminal program provided by PostgreSQL.
- 24th September 2020: PostgreSQL 13 Released! Packages; Source; Software Catalogue; File Browser Top → pgadmin → pgadmin3 → v1.22.2 Directories.
Tools like the PostgreSQL Operator make it easy to get PostgreSQL up and running on Kubernetes, but what about actually accessing your Postgres databases? PgAdmin 4 is a popular choice for managing PostgreSQL workloads as it's both accessible from a web browser and provides an intuitive interface for daily PostgreSQL tasks such as running queries, adding new tables, and much more.
Give the role a descriptive name > click ‘OK’. You do NOT need to create a password for the Group role; we will create a password for the Login role created later in this document.
Pgadmin 4
![Pgadmin Pgadmin](https://i.stack.imgur.com/RbxAP.png)
Expand ‘Databases’ > right-click on the database you would like to connect to Chartio > select ‘Properties’.
In the ‘Privileges’ tab select the newly created group from the ‘Role’ drop-down menu > check the ‘Connect’ box > click ‘Add/Change’ > click ‘OK’.
Click the expand arrow next to your database > expand ‘Schemas’ > right-click ‘public’ > select ‘Grant Wizard’.
On the ‘Selection’ tab click ‘Check All’.
In the ‘Privileges’ tab select the newly created group from the ‘Role’ drop-down menu > check the ‘Select’ box > click ‘Add/Change’ > click ‘OK’.
If your schema is not ‘public’, you will also need to grant USAGE permissions on the schema.
Under your server tree right-click ‘Login Roles’ > select ‘New Login Role’
Type a descriptive name for the user.
On the ‘Definition’ tab enter a secure password.
On the ‘Role membership’ tab add the newly create group to the ‘Member’ window > click ‘OK’.
Pgadmin 2
You have successfully created a new read-only user for your database. Use the credentials created for the Login role when setting up your PostgreSQL connection for Chartio.
For information on creating a user with psql, see this article.
For more information on connecting your PostgreSQL database to Chartio, see our documentation.
NOTE: This section assumes that you have downloaded and installed pgAdmin 4.
Pgadmin Download
![Pgadmin Pgadmin](https://pricesghana.com/wp-content/uploads/2018/08/hisense.png)
pgAdmin is the most popular and feature-rich platform for administration and development of PostgreSQL databases. Check the pgAdmin official page for more information.
To connect to your remote PostgreSQL database server using pgAdmin 4, follow these steps:
- Make sure that you have your cloud server’s IP address and application credentials (instructions).
- Open port 5432 in the server firewall (instructions).IMPORTANT: By default, the database port for the nodes in this solution cannot be accessed over a public IP address. As a result, you will only be able to connect to your database nodes from machines that are running in the same network. For security reasons, we do not recommend making the database port accessible over a public IP address. If you must make it accessible over a public IP address, we recommend restricting access to a trusted list of source IP addresses using firewall rules. For development purposes, you can also use a VPN or SSH tunnel. Refer to the FAQ for information on accessing restricted ports using an SSH tunnel or opening ports in the server firewall.
- Connect to your cloud server using PuTTY or another SSH client (instructions).
- At the server console, edit the file /opt/bitnami/postgresql/data/pg_hba.conf and add the following at the end, then save the file:
- Edit the file /opt/bitnami/postgresql/data/postgresql.conf and replace this linewith:
- Save the file.
- Restart the PostgreSQL server:
Your PostgreSQL server is now configured to accept remote connections, and you can connect to it using pgAdmin 4. Follow these steps:
- Launch pgAdmin 4.
- Go to the “Dashboard” tab. In the “Quick Link” section, click “Add New Server” to add a new connection.
- Select the “Connection” tab in the “Create-Server” window. Key in djing.
- Then, configure the connection as follows:
- Enter your server’s IP address in the “Hostname/Address” field.
- Specify the “Port” as “5432”.
- Enter the name of the database in the “Database Maintenance” field.
- Enter your username as postgres and password (use the same password you used when previously configuring the server to accept remote connections) for the database.
- Click “Save” to apply the configuration.
- Check that the connection between pgAdmin 4 and the PostgreSQL database server is active. Navigate to the “Dashboard” tab and find the state of the server in the “Server activity” section: