forked from docs/doc-exports
Reviewed-by: Wagner, Fabian <fabian.wagner@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
9.7 KiB
9.7 KiB
Connecting to a DB Instance Through a Public Network
You can connect to a DB instance through a non-SSL connection or an SSL connection. The SSL connection encrypts data and is more secure.
Preparations
- Install the Microsoft SQL Server client.
For details, see section How Can I Install SQL Server Management Studio?
- Bind an EIP to the target DB instance and configure security group rules.
- Bind an EIP to the target DB instance.
For details about how to bind an EIP, see section Binding an EIP.
- Obtain the IP address of the local device.
- Configure security group rules.
Add the IP address obtained in 2.b and the instance port to the inbound rule of the security group.
For details about how to configure a security group rule, see section Configuring Security Group Rules.
- Run the ping command to connect the EIP that has been bound to the target DB instance in 2.a to check that the local device can connect to the EIP.
- Bind an EIP to the target DB instance.
Non-SSL Connection
- Start SQL Server Management Studio.
- Choose Connect > Database Engine. In the displayed dialog box, enter login information.
- 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.
- 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.
- Click Connect to connect to the DB instance.
If the connection fails, ensure that preparations have been correctly made in Preparations and try again.
SSL Connection
- Download the SSL root certificate and then upload it.
- In the DB Information area on the Basic Information page, click
in the SSL field to download the root certificate or certificate bundle.
- Upload the root certificate to the ECS to be connected to the DB instance.
- Import the root certificate to the Windows OS on the ECS. For details, see How Can I Import the Root Certificate to a Windows or Linux OS?
- In the DB Information area on the Basic Information page, click
- Start SQL Server Management Studio.
- Choose Connect > Database Engine. In the displayed dialog box, enter login information.
- 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.
- 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.
- 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.)
- Click Connect to connect to the DB instance.
If the connection fails, ensure that preparations have been correctly made in Preparations and try again.