This topic describes how to use the pgAdmin 4 client to connect to a PolarDB-O cluster. In addition to connecting to a PolarDB-O cluster in the Apsara PolarDB console, you can also connect to the cluster by using the pgAdmin 4 client.
More connection methods
In addition to using the pgAdmin 4 client, you can also use Command Line Interface (CLI) to connect to an Apsara PolarDB cluster. Click Download clients and drivers to download the client,
- For more information about how to use JDBC to connect to Apsara PolarDB, see PolarDB-O JDBC.
- For more information about how to use .NET to connect to Apsara PolarDB, see PolarDB-O .NET.
- For more information about how to use ODBC to connect to Apsara PolarDB, see PolarDB-O ODBC.
- For more information about how to use OCI to connect to Apsara PolarDB, see PolarDB (compatible with Oracle) OCI.
Prerequisites
- You have created a privileged account or a standard account for an existing database cluster. For more information, see Create database accounts.
- You have added the IP address of the host that you want to connect to the Apsara PolarDB cluster to the whitelist. For more information, see Configure a whitelist for a cluster.
- You have installed pgAdmin 4 in a client (such as ECS) that can be used to connect to Apsara PolarDB.
Procedure
Next
Troubleshooting
- The IP address whitelist is invalid.
- The default whitelist contains only the IP address 127.0.0.1. 127.0.0.1 indicates that no IP address is allowed to access the cluster. Therefore, you must add IP addresses to the whitelist. For more information, see Configure a whitelist for a cluster.
- You have added 0.0.0.0 to the whitelist. The required format is 0.0.0.0/0.
Notice The CIDR block 0.0.0.0/0 indicates that all IP addresses are allowed to access the cluster. Use this CIDR block with caution.
- The public IP addresses you add to the whitelist are invalid. For example, the public IP address may be a dynamic IP address. The tools or websites used to query the public IP addresses provide invalid incorrect IP addresses.
- The internal or public endpoint is incorrectly used in the corresponding network.
The connection fails when you use an internal endpoint to connect over the Internet or use a public endpoint to connect over an internal network.
Use the required endpoint. If you want to connect to an Apsara PolarDB cluster over an internal network, you must use an internal endpoint. If you need to connect to the cluster over the Internet, you must use a public endpoint.