2016-01-26 104 views
0

我是Amazon RDS的新手。我對這項服務有很多疑惑,甚至在亞馬遜網站上也無法在互聯網上獲得任何合理的東西。將Amazon RDS與數據庫連接

我想知道我有一個具有數據庫的Web應用程序。如何將我的數據庫連接到Amazon RDS服務。亞馬遜網站上的教程沒有太多信息。我想要一步一步的教程,但在互聯網上找不到任何東西。

我可以將Amazon RDS與我的webapp的本地數據庫連接嗎?

+0

你配置了RDS嗎? –

+0

是的,我配置了它。 – Zeebok

+0

那麼現在有什麼問題? –

回答

0

登錄亞馬遜帳戶後,步驟RDS連接:

1) From the dashboard, Select RDS Dashboard, Here you can see the RDS instance 
2) Select instance and copy Endpoint string 
3) Now go to `/etc/phpmyadmin` and open `config.inc.php` file, change in that file to the endpoint which we have copied. Like below: <br> 
<?php 
$cfg['Servers'][$i]['auth_type'] = 'cookie'; 
    /* Server parameters */ 
    if (empty($dbserver)) $dbserver = 'mydbinstance.casdv4nzvleb.us-west-2.rds.amazonaws.com'; 
    $cfg['Servers'][$i]['host'] = $dbserver; 
?> 

4) Final step: change in your DB config file: 'localhost' to that 'mydbinstance.casdv4nzvleb.us-west-2.rds.amazonaws.com' 

先讓我看看你端點
希望這是有幫助的。

+0

目前我正在使用測試帳戶。 。 。 mydbinstance.casdv4nzvleb.us-west-2.rds.amazonaws.com:3306 – Zeebok

+0

使用此'mydbinstance.casdv4nzvleb.us-west-2.rds.amazonaws.com' –

+0

檢查我更新的答案 –

相關問題