Windows系统连接
<p>本文主要介绍如何在Windows操作系统的ECS上安装PostgreSQL客户端,并通过PostgreSQL客户端访问RDS-PostgreSQL实例。</p>
<p><span style="font-size:18px"><strong>前提条件</strong></span></p>
<ol>
<li>您已成功创建RDS-PostgreSQL实例,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/Getting_Started.RDS_PostgreSQL.Create_RDS_PostgreSQL" target="_blank">创建RDS-PostgreSQL实例</a>。</li>
<li>您已成功创建ECS,且实例处于运行中,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/Getting_Started.RDS_PostgreSQL.Create_ECS" target="_blank">创建ECS</a>,创建ECS时,镜像请选择Windows。</li>
<li>您已成功开通白名单,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/Getting_Started.RDS_PostgreSQL.Create_Whitelist" target="_blank">开通白名单</a>。</li>
</ol>
<p><span style="font-size:18px"><strong>操作步骤</strong></span></p>
<p>1. 登录ECS,可参考<a href="https://pinganyun.com/ssr/help/compute/ecs/Quick_Start.Windows_Quick_Start.Login_Instance" target="_blank">登录Windows云主机</a>。</p>
<p>2. 下载并安装pgAdmin客户端,可参考<a href="https://www.pgadmin.org/download/" target="_blank">pgAdmin官网</a>,文本以Windows操作系统,pg Admin 4客户端为例,<a href="https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.5/windows/" target="_blank">下载地址</a>。</p>
<p>3. 启动pg Admin客户端。</p>
<p>4. 在页面左侧<strong>Browser</strong>区域,右键单击<strong>Servers </strong>> <strong>Create</strong> > <strong>Server</strong>。</p>
<p><img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142635-101a6b2096a3.png" style="height:118px; width:446px" /></p>
<p>5. 在<strong>Create-Server</strong>页面,根据以下主要信息填写<strong>Genneral</strong>页签。</p>
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="background-color:#ededed; vertical-align:top">
<p><strong>配置项</strong></p>
</td>
<td style="background-color:#ededed; vertical-align:top">
<p><strong>说明</strong></p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Name</p>
</td>
<td style="vertical-align:top">
<p>服务器组的名称。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Server group</p>
</td>
<td style="vertical-align:top">
<p>服务器组的类型。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Connect now?</p>
</td>
<td style="vertical-align:top">
<p>是否现在连接。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Comments</p>
</td>
<td style="vertical-align:top">
<p>注释。</p>
</td>
</tr>
</tbody>
</table>
<p>6. 根据以下主要信息,填写<strong>Connection</strong>页签。</p>
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="background-color:#ededed; vertical-align:top">
<p><strong>配置项</strong></p>
</td>
<td style="background-color:#ededed; vertical-align:top">
<p><strong>说明</strong></p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Host name/address</p>
</td>
<td style="vertical-align:top">
<p>目标RDS-PostgreSQL实例的访问域名。</p>
<p><img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142733-160df52a9ce4.png" style="height:26px; margin:0px; width:65px" />:可在目标RDS-PostgreSQL实例的<strong>基本信息</strong>页面查询,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/User_Guide_RDS_PostgreSQL.Instance_Management.View_Instance.View_Common_Instance">查看实例基本信息</a>。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Port</p>
</td>
<td style="vertical-align:top">
<p>目标RDS-PostgreSQL实例的端口号。</p>
<p><img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142733-160df52a9ce4.png" style="height:26px; margin:0px; width:65px" />:可在目标RDS-PostgreSQL实例的<strong>基本信息</strong>页面查询,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/User_Guide_RDS_PostgreSQL.Instance_Management.View_Instance.View_Common_Instance">查看实例基本信息</a>。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Maintenance database</p>
</td>
<td style="vertical-align:top">
<p>维护数据库,需要连接的数据库名称,默认为postgres数据库。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Username</p>
</td>
<td style="vertical-align:top">
<p>创建的管理员名称。</p>
<p><img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142733-160df52a9ce4.png" style="height:26px; margin:0px; width:65px" />:可在目标RDS-PostgreSQL实例的<strong>账号管理</strong>页面查询,可参考<a href="https://pinganyun.com/ssr/help/database/RDS/User_Guide_RDS_PostgreSQL.Instance_Management.Create_Instance.Create_Common_Instance">创建常规实例</a>。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Password</p>
</td>
<td style="vertical-align:top">
<p>管理员对应的密码。</p>
</td>
</tr>
<tr>
<td style="vertical-align:top">
<p>Save password?</p>
</td>
<td style="vertical-align:top">
<p>是否保存密码。</p>
</td>
</tr>
</tbody>
</table>
<p> <img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142815-1d7efd4894e3.png" style="height:541px; width:486px" /></p>
<p>7. 单击<strong>Save</strong>。</p>
<p><span style="font-size:18px"><strong>执行结果</strong></span></p>
<p>成功连接RDSPostgreSQL数据库。 </p>
<p><img src="https://pcp-portal-sca.obs-cn-shenzhen.pinganyun.com/pcp-portal-sca/20191507142839-17f1057e9bec.png" style="height:353px; width:830px" /></p>
提交成功!非常感谢您的反馈,我们会继续努力做到更好!