Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ Relational Database Service/ User Guide/ Working with RDS for PostgreSQL/ Instance Connection/ Connecting to an RDS for PostgreSQL Instance Using pgAdmin

Connecting to an RDS for PostgreSQL Instance Using pgAdmin

Updated on 2025-02-13 GMT+08:00

pgAdmin is an administration and development tool for PostgreSQL. Using pgAdmin, you can connect to specific databases from your clients, create tables, and run simple and complex SQL statements. pgAdmin can be used on Windows, Linux, macOS, and other operating systems. The latest version of pgAdmin is based on the browser/server (B/S) architecture. For more information, see the pgAdmin documentation.

This section uses pgAdmin 4-4.17 as an example to describe how to use pgAdmin to connect to an RDS for PostgreSQL instance and create databases and tables.

NOTICE:

The pgAdmin version must be 4 or later.

Procedure

  1. Obtain the pgAdmin installation package.

    Download the pgAdmin installation package for Windows from the pgAdmin official website.

  2. Double-click the installation package and complete the installation as instructed.
  3. Start the pgAdmin client after the installation.
  4. In the displayed login window, right-click Servers and choose Register > Server from the shortcut menu.

    Figure 1 Login information

  5. On the General page, specify Name. On the Connection page, specify information about the DB instance to be connected. Then, click Save.

    Figure 2 Entering basic information
    Figure 3 Entering connection information

    Parameter description:

    • Host name/address: indicates the EIP bound to the target DB instance.
    • Port: indicates the database port. By default, the value is 5432.
    • Username: indicates the username. By default, the value is root.
    • Password: indicates the password of the target database username.

  6. In the login window, check that the connection information is correct. The target DB instance is successfully connected.

Basic Database Operations

  1. In the navigation pane on the left of pgAdmin, right-click the target instance node and choose Create > Database from the shortcut menu.
  2. On the General tab, specify Database and click Save.

    Figure 4 Creating a database

  1. Access the created database. In the navigation pane on the left, right-click Tables and choose Create > Table from the shortcut menu.

    NOTE:

    Create tables in the schema of the database created by the current user.

  2. On the General tab, enter required information and click Save.

    Figure 5 Basic information

  3. On the Columns tab, add table columns and click Save.

    Figure 6 Adding table columns

On the top menu bar, choose Tools > Query Tool. The SQL CLI is displayed.

NOTE:

Take care when adding, deleting, or modifying data in the instance. Improper operations can cause instance or service exceptions.

Figure 7 SQL execution
  • Enter an INSERT command and click Execute to insert data into the table.
    Figure 8 Inserting data
  • Enter an SELECT command and click Execute to query data in the table.
    Figure 9 Querying data

In the navigation pane on the left, select a database and click the Dashboard tab on the right pane to view database metrics, including Database sessions, Transactions per second, Tuples in, Tuples out, and Block I/O.

Figure 10 Viewing metrics
NOTE:

Cloud Eye monitors operating statuses of DB instances. You can view the DB instance metrics on the management console. For details, see Viewing Monitoring Metrics.

  1. In the navigation pane on the left, right-click the database to be backed up and choose Backup from the shortcut menu.
  2. On the General tab, enter required information and click Backup.
    Figure 11 Backing up data
  1. In the navigation pane on the left, right-click the database to be restored and choose Restore from the shortcut menu.
  2. On the displayed tab in the right pane, select a file name and click Restore.
    Figure 12 Restoring data
    Figure 13 Restoration completed
  1. In the navigation pane on the left of pgAdmin, right-click the target instance node and choose Create > Database from the shortcut menu.
  2. On the General tab, specify Database and click Save.

    Figure 4 Creating a database

  1. Access the created database. In the navigation pane on the left, right-click Tables and choose Create > Table from the shortcut menu.

    NOTE:

    Create tables in the schema of the database created by the current user.

  2. On the General tab, enter required information and click Save.

    Figure 5 Basic information

  3. On the Columns tab, add table columns and click Save.

    Figure 6 Adding table columns

On the top menu bar, choose Tools > Query Tool. The SQL CLI is displayed.

NOTE:

Take care when adding, deleting, or modifying data in the instance. Improper operations can cause instance or service exceptions.

Figure 7 SQL execution
  • Enter an INSERT command and click Execute to insert data into the table.
    Figure 8 Inserting data
  • Enter an SELECT command and click Execute to query data in the table.
    Figure 9 Querying data

In the navigation pane on the left, select a database and click the Dashboard tab on the right pane to view database metrics, including Database sessions, Transactions per second, Tuples in, Tuples out, and Block I/O.

Figure 10 Viewing metrics
NOTE:

Cloud Eye monitors operating statuses of DB instances. You can view the DB instance metrics on the management console. For details, see Viewing Monitoring Metrics.

  1. In the navigation pane on the left, right-click the database to be backed up and choose Backup from the shortcut menu.
  2. On the General tab, enter required information and click Backup.
    Figure 11 Backing up data
  1. In the navigation pane on the left, right-click the database to be restored and choose Restore from the shortcut menu.
  2. On the displayed tab in the right pane, select a file name and click Restore.
    Figure 12 Restoring data
    Figure 13 Restoration completed

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback