我正在尝试将我的AWS RDS postgres数据库连接到我的远程访问的phpPgAdmin,它在ec2实例上运行。我能够访问phpPgAdmin页面,并编辑了phpPgAdmin文件夹中的config.inc.php文件,以便它包含RDS服务器的端点。
这是config.inc.php的相关部分。
/**
* Central phpPgAdmin configuration. As a user you may modify the
* settings here for your particular configuration.
*
* $Id: config.inc.php-dist,v 1.55 2008/02/18 21:10:31 xzilla Exp $
*/
// An example server. Create as many of these as you wish,
// indexed from zero upwards.
// Display name for the server on the login screen
$conf['servers'][0]['desc'] = 'Visionmap';
// Hostname or IP address for server. Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = '*myRDSendpoint*';
// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;
问题是,当我试图登录到服务器,它需要永远,然后说登录失败。我已经用相同的用户名和密码与pgAdminIII连接到RDS服务器,没有问题。我还重新启动了httpd几次。phpPgAdmin超时
Serverfault.com上的这个线程提供了答案。
https://serverfault.com/questions/402127/cant-login-to-phppgadmin我没有启用来自EC2的公共ip地址的TCP入站流量。