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>
37 lines
9.7 KiB
HTML
37 lines
9.7 KiB
HTML
<a name="rds_03_0007"></a><a name="rds_03_0007"></a>
|
|
|
|
<h1 class="topictitle1">Connecting to a DB Instance Through a Public Network</h1>
|
|
<div id="body1549871554862"><p id="rds_03_0007__p152782710534">You can connect to a DB instance through a non-SSL connection or an SSL connection. The <span class="keyword" id="rds_03_0007__keyword813610398513">SSL connection</span> <span class="keyword" id="rds_03_0007__keyword2137123965116">encrypts data</span> and is more secure.</p>
|
|
<div class="section" id="rds_03_0007__section367520762117"><a name="rds_03_0007__section367520762117"></a><a name="section367520762117"></a><h4 class="sectiontitle">Preparations</h4><ol id="rds_03_0007__ol321893420420"><li id="rds_03_0007__li11218113484218">Install the <span id="rds_03_0007__text1494414144816">Microsoft SQL Server</span> client.<p id="rds_03_0007__p0374124642718">For details, see section <a href="rds_faq_0032.html">How Can I Install SQL Server Management Studio?</a></p>
|
|
</li><li id="rds_03_0007__li18407114219425">Bind an EIP to the target DB instance and configure security group rules.<ol type="a" id="rds_03_0007__ol1893363363217"><li id="rds_03_0007__li1728416257345"><a name="rds_03_0007__li1728416257345"></a><a name="li1728416257345"></a>Bind an EIP to the target DB instance.<p id="rds_03_0007__p2186268342"><a name="rds_03_0007__li1728416257345"></a><a name="li1728416257345"></a>For details about how to bind an EIP, see section <a href="rds_03_0006.html">Binding an EIP</a>.</p>
|
|
</li><li id="rds_03_0007__li85977812411"><a name="rds_03_0007__li85977812411"></a><a name="li85977812411"></a>Obtain the IP address of the local device.</li><li id="rds_03_0007__li108021355113019">Configure security group rules.<p id="rds_03_0007__p736910157227"><a name="rds_03_0007__li108021355113019"></a><a name="li108021355113019"></a>Add the IP address obtained in <a href="#rds_03_0007__li85977812411">2.b</a> and the instance port to the inbound rule of the security group. </p>
|
|
<p id="rds_03_0007__p14819145563017">For details about how to configure a security group rule, see section <a href="rds_03_0051.html">Configuring Security Group Rules</a>.</p>
|
|
</li><li id="rds_03_0007__li62361253112514">Run the <strong id="rds_03_0007__b19366184512619">ping</strong> command to connect the EIP that has been bound to the target DB instance in <a href="#rds_03_0007__li1728416257345">2.a</a> to check that the local device can connect to the EIP.</li></ol>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="rds_03_0007__section8112152217539"><h4 class="sectiontitle">Non-SSL Connection</h4><ol id="rds_03_0007__ol6899121464513"><li id="rds_03_0007__li159041314144518"><span>Start SQL Server Management Studio.</span></li><li id="rds_03_0007__li18907114144515"><span>Choose <strong id="rds_03_0007__b832283413289">Connect</strong> > <strong id="rds_03_0007__b193221134152810">Database Engine</strong>. In the displayed dialog box, enter login information.</span><p><div class="fignone" id="rds_03_0007__fig99151514124518"><span class="figcap"><b>Figure 1 </b>Connecting to the server</span><br><span><img id="rds_03_0007__image1891951419454" src="en-us_image_0000001191211449.png"></span></div>
|
|
<ul id="rds_03_0007__ul1691911434510"><li id="rds_03_0007__li10920181414513"><strong id="rds_03_0007__b146943475614">Server name</strong>: indicates the IP address and port of the DB instance. Use a comma (,) to separate them. For example: x.x.x.x,8080.<ul id="rds_03_0007__ul19922614154519"><li id="rds_03_0007__li1292441416452">The IP address is the EIP that has been bound to the DB instance.</li><li id="rds_03_0007__li79301714124511">The port is the database port in the <strong id="rds_03_0007__b185961654145811">Connection Information</strong> area on the <strong id="rds_03_0007__b124841057175814">Basic Information</strong> page of the DB instance.</li></ul>
|
|
</li><li id="rds_03_0007__li1093720142451"><strong id="rds_03_0007__b842352706112352">Authentication</strong>: indicates the authentication mode. Select <strong id="rds_03_0007__b842352706112627">SQL Server Authentication</strong>.</li><li id="rds_03_0007__li11939101464515"><strong id="rds_03_0007__b842352706212721">Login</strong>: indicates the RDS database username. The default administrator is <strong id="rds_03_0007__b1158023303104748">rdsuser</strong>.</li><li id="rds_03_0007__li1794101416457"><strong id="rds_03_0007__b842352706171010">Password</strong>: indicates the password of the RDS database username.</li></ul>
|
|
</p></li><li id="rds_03_0007__li139521614134510"><span>Click <strong id="rds_03_0007__b842352706112844">Connect</strong> to connect to the DB instance.</span><p><div class="note" id="rds_03_0007__note1536635324218"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rds_03_0007__p14465173181314">If the connection fails, ensure that preparations have been correctly made in <a href="#rds_03_0007__section367520762117">Preparations</a> and try again.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="rds_03_0007__section335618164205"><h4 class="sectiontitle">SSL Connection</h4><ol id="rds_03_0007__ol9899222162618"><li id="rds_03_0007__li1519225152811"><span>Download the SSL root certificate and then upload it.</span><p><ol type="a" id="rds_03_0007__ol2176152722817"><li id="rds_03_0007__li148993221263">In the <span class="uicontrol" id="rds_03_0007__uicontrol1473416716"><b>DB Information</b></span> area on the <strong id="rds_03_0007__b1681443141717">Basic Information</strong> page, click <span><img id="rds_03_0007__image1947011361362" src="en-us_image_0000001191211453.png"></span> in the <strong id="rds_03_0007__b54749120711">SSL</strong> field to download the root certificate or certificate bundle.</li><li id="rds_03_0007__li289920228268">Upload the root certificate to the <span id="rds_03_0007__text1217121616487">ECS</span> to be connected to the DB instance.</li><li id="rds_03_0007__li5899192272610">Import the root certificate to the Windows OS on the <span id="rds_03_0007__text4496175673217">ECS</span>. For details, see <a href="rds_faq_0052.html">How Can I Import the Root Certificate to a Windows or Linux OS?</a><div class="note" id="rds_03_0007__note55991119113412"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="rds_03_0007__ul10599151913349"><li id="rds_03_0007__li10599121918349">Replace the old certificate before it expires to improve system security.</li><li id="rds_03_0007__li2599119163419">After you bind an EIP to a DB instance, you must reboot the instance for the SSL connection to take effect.</li></ul>
|
|
</div></div>
|
|
</li></ol>
|
|
</p></li><li id="rds_03_0007__li12841133311271"><span>Start SQL Server Management Studio.</span></li><li id="rds_03_0007__li188418335274"><span>Choose <strong id="rds_03_0007__b14381622102811">Connect</strong> > <strong id="rds_03_0007__b4438152282814">Database Engine</strong>. In the displayed dialog box, enter login information.</span><p><div class="fignone" id="rds_03_0007__fig1884118334272"><span class="figcap"><b>Figure 2 </b>Connecting to the server</span><br><span><img id="rds_03_0007__image12841133122712" src="en-us_image_0000001145051612.png"></span></div>
|
|
<ul id="rds_03_0007__ul18858113362710"><li id="rds_03_0007__li14858123317270"><strong id="rds_03_0007__b1229182319114">Server name</strong>: indicates the IP address and port of the DB instance. Use a comma (,) to separate them. For example: x.x.x.x,8080.<ul id="rds_03_0007__ul15858933192717"><li id="rds_03_0007__li685818331274">The IP address is the EIP that has been bound to the DB instance.</li><li id="rds_03_0007__li18581033152717">The port is the database port in the <strong id="rds_03_0007__b056484311119">Connection Information</strong> area on the <strong id="rds_03_0007__b156612436120">Basic Information</strong> page of the DB instance.</li></ul>
|
|
</li><li id="rds_03_0007__li148585337279"><strong id="rds_03_0007__b165752461115">Authentication</strong>: indicates the authentication mode. Select <strong id="rds_03_0007__b057714612113">SQL Server Authentication</strong>.</li><li id="rds_03_0007__li1385883315279"><strong id="rds_03_0007__b162891440">Login</strong>: indicates the RDS database username. The default administrator is <strong id="rds_03_0007__b1636886129">rdsuser</strong>.</li><li id="rds_03_0007__li20874173372710"><strong id="rds_03_0007__b1365580043">Password</strong>: indicates the password of the RDS database username.</li></ul>
|
|
</p></li><li id="rds_03_0007__li47772152307"><span>On the <strong id="rds_03_0007__b71488248218">Connection Properties</strong> page, enter related parameters and select <strong id="rds_03_0007__b1374924918217">Encrypt connection</strong> to enable SSL encryption. (By default, <strong id="rds_03_0007__b8687133311318">Encrypt connection</strong> is not selected. You need to select it manually.)</span><p><div class="fignone" id="rds_03_0007__fig2077710158306"><span class="figcap"><b>Figure 3 </b>Connection properties</span><br><span><img id="rds_03_0007__image207770150305" src="en-us_image_0000001145051614.jpg"></span></div>
|
|
</p></li><li id="rds_03_0007__li987483316278"><span>Click <strong id="rds_03_0007__b228212764">Connect</strong> to connect to the DB instance.</span><p><div class="note" id="rds_03_0007__note187416330276"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="rds_03_0007__p3874153342711">If the connection fails, ensure that preparations have been correctly made in <a href="#rds_03_0007__section367520762117">Preparations</a> and try again.</p>
|
|
</div></div>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_03_0052.html">Connecting to a SQL Server DB Instance Through a Public Network</a></div>
|
|
</div>
|
|
</div>
|
|
|