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

Step 3: Connect to a DB Instance Through a Private Network

Updated on 2023-07-06 GMT+08:00

You can connect to a DB instance through a common connection or an SSL connection. The SSL connection encrypts data and is more secure.

Preparations

  1. Prepare an ECS.

    To connect to a DB instance through a private network, you must first create an ECS.

    For details about how to create an ECS, see section How Can I Create and Connect to an ECS?

    • The ECS and RDS DB instance must be in the same VPC.
    • The ECS must be allowed by the security group to access RDS DB instances.
      • If the security group to which the target DB instance belongs is the default security group, you do not need to configure security group rules.
      • If the security group to which the target DB instance belongs is not the default security group, check whether the security group rules allow the ECS to connect to the DB instance.
        1. Log in to the management console.
        2. Click in the upper left corner and select a region and a project.
        3. Click Service List. Under Database, click Relational Database Service. The RDS console is displayed.
        4. On the Instance Management page, click the target DB instance.
        5. In the Connection Information area, click the security group to view its rules.

          If the security group rules allow the access from the ECS, the ECS can connect to the DB instance.

          If the security group rules do not allow the access from the ECS, you need to add a security group rule. For details, see section Step 2: Configure Security Group Rules.

  2. Install the Microsoft SQL Server client.

    Install the Microsoft SQL Server client on the ECS or device that was prepared in 1.

Common Connection

  1. Log in to the ECS or device that can access RDS.
  2. Start SQL Server Management Studio.
  3. Choose Connect > Database Engine. In the displayed dialog box, enter login information.

    Figure 1 Connecting to the server
    • Server name: indicates the IP address and port of the DB instance. Use a comma (,) to separate them. For example: x.x.x.x,8080.
      • The IP address is the floating IP address in the Connection Information area on the Basic Information page of the DB instance.
      • The port is the database port in the Connection Information area on the Basic Information page of the DB instance.
    • Authentication: indicates the authentication mode. Select SQL Server Authentication.
    • Login: indicates the RDS database username. The default administrator is rdsuser.
    • Password: indicates the password of the RDS database username.

  4. Click Connect to connect to the DB instance.

    NOTE:

    If the connection fails, ensure that preparations have been correctly made in Preparations and try again.

SSL Connection

  1. Download the SSL root certificate and then upload it.

    1. In the DB Information area on the Basic Information page, click in the SSL field to download the root certificate or certificate bundle.
    2. Upload the root certificate to the ECS or save it to the device to be connected to the DB instance.
    3. Import the root certificate into the Windows OS on the ECS. For details, see How Can I Import the Root Certificate to the Windows or Linux OS?
      NOTE:
      • Replace the old certificate before it expires to improve system security.
      • After you bind an EIP to a DB instance, you must reboot the instance for the SSL connection to take effect.

  2. Start SQL Server Management Studio.
  3. Choose Connect > Database Engine. In the displayed dialog box, enter login information.

    Figure 2 Connecting to the server
    • Server name: indicates the IP address and port of the DB instance. Use a comma (,) to separate them. For example: x.x.x.x,8080.
      • The IP address is the floating IP address in the Connection Information area on the Basic Information page of the DB instance.
      • The port is the database port in the Connection Information area on the Basic Information page of the DB instance.
    • Authentication: indicates the authentication mode. Select SQL Server Authentication.
    • Login: indicates the RDS database username. The default administrator is rdsuser.
    • Password: indicates the password of the RDS database username.

  4. On the Connection Properties page, enter related parameters and select Encrypt connection to enable SSL encryption. (By default, Encrypt connection is not selected. You need to select it manually.)

    Figure 3 Connection properties

  5. Click Connect to connect to the DB instance.

    NOTE:

    If the connection fails, ensure that preparations have been correctly made in Preparations and try again.

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