婉兮清扬

案上诗书杯中酒之快意人生

SSL Connection to RDS Instances in phpMyAdmin

发表时间:2015-09-01 06:56:24

Setting up SSL connection between phpMyAdmin and the RDS MySQL server is quite straight forward. Below is a demo setup on Amazon Linux with phpMyAdmin 4.4.14. The web server is Apache with PHP 5.


First of all we download and unzip phpMyAdmin. At the same time we download the root certificate for RDS to the phpMyAdmin folder:



$ cd /var/www/html

$ wget https://files.phpmyadmin.net/phpMyAdmin/4.4.14/phpMyAdmin-4.4.14-all-languages.zip
$ unzip phpMyAdmin-4.4.14-all-languages.zip
$ cd phpMyAdmin-4.4.14-all-languages.zip
$ cp config.sample.inc.php config.inc.php
$ wget https://s3.amazonaws.com/rds-downloads/rds-ca-2015-root.pem

Now edit config.inc.php, using the following configurations for the "First server", which is your RDS instance.



/*

* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'instance-name.xxxxxxxxxxxx.ap-southeast-2.rds.amazonaws.com';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i][''] = '/var/www/html/phpMyAdmin-4.4.14-all-languages/rds-ca-2015-root.pem';

You will probably need to restart httpd to make things work.



$ sudo service httpd restart


At this point, you can use phpMyAdmin to login to your RDS instance. After you login, use the following SQL query to verify the SSL connection:



show status like 'Ssl_cipher';


If you see the following result, the SSL connection is successful:



Variable_name 	Value 	

Ssl_cipher AES256-SHA
上一篇 下一篇

发表时间:2015-09-02 14:34:34    评论者:Michael Chen

One typo: "After you login, us the following " --> After you login, use the following

发表时间:2015-09-05 10:01:59    评论者:qyjohn

Thanks a lot for letting me know. Fixed the typo already.

 
姓名:
评论:

请输入下面这首诗词的作者姓名。

东风夜放花千树,更吹落、星如雨。
众里寻他千百度,蓦然回首,那人却在,灯火阑珊处。

答案:

云与清风常拥有,
冰雪知音世难求。
击节纵歌相对笑,
案上诗书杯中酒。

2020年12月31日
洛杉矶

最新评论


2025-11-15 06:29:51
qyjohn 评论了 《青桔》

2025-11-14 01:55:04
wells 评论了 《青桔》

2025-10-24 18:04:06
Ted Wang 评论了 《关于作者(About Me)》

2025-03-27 08:28:09
Max 评论了 《父亲走了》

2025-03-08 04:13:52
W 评论了 《我不想颂扬普京大帝》

2024-07-22 16:02:03
云思 评论了 《无题》

2024-06-27 10:01:54
yiming 评论了 《致访客(Welcome)》

2024-05-06 08:50:06
qyjohn 评论了 《致访客(Welcome)》

2024-05-03 19:49:00
jimmie 评论了 《致访客(Welcome)》

2024-02-19 03:32:57
林小静 评论了 《埋剑渡》

2024-01-05 03:54:28
路过者 评论了 《2023年度盘点》

2024-01-04 10:22:05
qyjohn 评论了 《致访客(Welcome)》

2024-01-04 08:05:13
qyjohn 评论了 《2023年度盘点》

2023-12-17 15:18:45
qyjohn 评论了 《乱记》

2023-12-15 00:43:24
wells 评论了 《乱记》