'How to setup AWS rds with SSL with phpmyadmin

I want to encrypt the connection to db from phpmyadmin using SSL. I am confused on how to use bundle certificate



Solution 1:[1]

You have to set it up as described in the docs using $cfg['Servers'][$i]['ssl'] option:

Whether to enable SSL for the connection between phpMyAdmin and the MySQL server to secure the connection.

Solution 2:[2]

This worked for me:

Upload the rds-combined-ca-bundle.pem to some path that phpMyAdmin can access.

Then set the following configuration vars in config.inc.php:

$cfg['Servers'][$i]['ssl_ca_path'] = '/path/to/';
$cfg['Servers'][$i]['ssl_key'] = 'rds-combined-ca-bundle.pem';
$cfg['Servers'][$i]['ssl_cert'] = 'rds-combined-ca-bundle.pem';
$cfg['Servers'][$i]['ssl_ca'] = '/path/to/rds-combined-ca-bundle.pem';

Solution 3:[3]

First you have to download the certificate by visiting here: Download an SSL certificate for your managed database in Amazon Lightsail

Here is a direct link for combined ca bundle: rds-combined-ca-bundle.pem

Now copy this 'rds-combined-ca-bundle.pem' file to your phpMyAdmin folder and search for config.inc.php file.

open this file (config.inc.php) in notepad or in any text editor and write the below lines:

$cfg['Servers'][$i]['ssl'] = true;
$cfg['Servers'][$i]['ssl_ca'] = 'rds-combined-ca-bundle.pem';
$cfg['Servers'][$i]['ssl_mode'] = 'VERIFY_IDENTITY';

Now save the file and visit you host (http://localhost/phpMyAdmin).

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcin
Solution 2 Joe K
Solution 3 Md Shahbaz Ahmad