2012-02-17 75 views
2

我決定在aws開發者論壇上提出一個AWS相關問題,但沒有找到解決方案。phpmyadmin for RDS

我也跟着上的重複問題here

是否有人可以告訴我在哪裏,我做出錯誤的舉動給出的步驟。

我的EC2實例位於us-west-1c(linux)中,並且安裝了phpmyadmin。 我的RDS也在我們這裏-west-1c 我對EC2和RDS通用的安全grp配置了http/ssh/mysql端口。

我能夠使用php中的mysql_connect(),我的實例連接到我的rds, ,但是如果我將我的rds端點作爲phpmyadmin(config.inc.php)中的主機,它不會響應。

這是我的config.inc.php看起來像

$ CFG樁[ '服務器'] [$ i] [ '主機'] = 'xx.amazonaws.com';

$ cfg ['Servers'] [$ i] ['port'] ='3306';

$ cfg ['Servers'] [$ i] ['socket'] ='';

$ cfg ['Servers'] [$ i] ['connect_type'] ='tcp';

$ cfg ['Servers'] [$ i] ['extension'] ='mysql';

$ cfg ['Servers'] [$ i] ['compress'] = true;

$ cfg ['Servers'] [$ i] ['auth_type'] ='config';

$ cfg ['Servers'] [$ i] ['user'] ='xxx';

$ cfg ['Servers'] [$ i] ['password'] ='xxx';

我在這裏錯過了什麼嗎?

非常感謝你提前

回答

1

你必須允許在httpd的conf外連接:

sudo nano /etc/httpd/conf.d/phpmyadmin.conf 

更新它:

<Directory "/usr/share/phpmyadmin"> 
    Order Deny,Allow 
    Allow from all 
</Directory> 

然後重新啓動Apache

sudo service httpd restart 

您只需在phpmyadmin/config中更新以下內容

sudo nano /usr/share/phpmyadmin/config.inc.php 

$cfg['blowfish_secret'] = 'somerandomtext'; 
$cfg['Servers'][$i]['host'] = 'xxx-your-service-host.rds.amazonaws.com'; 

希望這有助於您。