0 like 0 dislike
166 views

Please log in or register to answer this question.

2 Answers

0 like 0 dislike
answered by (4k points)  

Connect AWS RDS MySQL instance with phpMyAdmin

  1. Install Apache Web Server. sudo apt-get update -y. ...
  2. Install PHP. sudo apt-get install php -y. ...
  3. Restart Apache. systemctl restart apache2.service.
  4. Install and configure phpMyAdmin. ...
  5. Restart Apache. ...
  6. Open inbound port 3306 in RDS Security group for access MySQL to phpMyAdmin. ...
  7. Access phpMyAdmin from your local browser.
0 like 0 dislike
answered by (970 points)  

In this tutorial, we will learn how to connect AWS RDS MySQL server with phpMyAdmin.
 


Follow below steps to configure:

Step 1:
Install Apache Web Server

sudo apt-get update -y
sudo apt-get install apache2 -y
sudo systemctl start apache2.service
 
Verify that Apache was installed without errors by accessing it from your local browser. Enter http://SERVER_IP/

Step 2:
Install PHP
sudo apt-get install php -y
sudo apt-get install -y php-{bcmath,bz2,intl,gd,mbstring,mcrypt,mysql,zip} 
sudo apt-get install libapache2-mod-php  -y
 
Step 3:
Restart Apache
systemctl restart apache2.service
 
Step 4:
Install and configure phpMyAdmin
cd /var/www/html/
 
Download phpMyAdmin from an authorized website using wget command
Unzip phpMyAdmin
unzip phpMyAdmin-4.7.3-all-languages.zip
 
Rename phpMyAdmin and go to phpMyAdmin folder
mv phpMyAdmin-4.7.3-all-languages phpmyadmin
cd phpmyadmin
 
Edit the configuration file for phpMyAdmin.
vim config.sample.inc.php
 
Below is a default file
/* Server parameters */ 
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Now, edit this file according to below file
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'RDS MYSQL ENDPOINT';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
Save file and Close.

You can get 'RDS MYSQL ENDPOINT' from AWS RDS console. 
 
 
Step 5:
Restart Apache
systemctl restart apache2.service
 
Step 6:
Open inbound port 3306 in RDS Security group for access MySQL to phpMyAdmin. you can give which IP where phpMyAdmin is installed in Security group.
 
Step 7:
Access phpMyAdmin from your local browser. Enter http://SERVER_IP/phpMyAdmin 
enter username and password of your RDS. and access it.

Related questions

0 like 0 dislike
1 answer
asked Mar 31, 2019 in MySQL Database Forum by nijamutheen j (13.4k points)  
0 like 0 dislike
0 answers
...