nav-img
Advanced

Connecting to a DB Instance from a Windows Server

If you cannot access your DB instance through a floating IP address, bind an EIP to the DB instance and connect to it through the EIP.

You can connect to an instance through a non-SSL connection or an SSL connection using SQL Server Management Studio. The SSL connection encrypts data and is more secure.

Non-SSL Connection

  1. Start SQL Server Management Studio.
  2. 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 EIP that has been bound to 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.

  3. Click Connect to connect to the DB instance.

SSL Connection

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

    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.
    4. In the DB Information area on the Basic Information page, click next to the SSL field to download the root certificate or certificate bundle.
    5. Import the root certificate to the Windows ECS. For details, see How Do I Import the SSL Certificate of an RDS Instance to a Windows or Linux Server?
      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 EIP that has been bound to 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 Options. 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.