How do you view the database in phpmyadmin while using Amazon AWS EC2 via SSH?

8,594

Your EC2 instance has a public IP and a domain that you can use to connect to.

So of course, since it's a Linux machine like any other, you can install phpMyAdmin on it, and then navigate to xx.xx.xx.xx/phpmyadmin or something like ec2-xx-xx-xx-xx.compute-1.amazonaws.com/phpmyadmin, where xx is your Elastic IP address.

Since you're already running a web server—and I'm assuming it's Apache—all you have to do is sudo apt-get install phpmyadmin and then, in /etc/apache2/apache2.conf, add the following line:

Include /etc/phpmyadmin/apache.conf

Then restart your Apache server.

Really, there's nothing you can't do with the EC2 instance that any other server could.

Share:
8,594

Related videos on Youtube

r8bj3k
Author by

r8bj3k

Updated on September 18, 2022

Comments

  • r8bj3k
    r8bj3k over 1 year

    I am in the process of setting up a new website via Amazon AWS EC2. I typically use SSH in order to connect to the instance and then occasionally I use FileZilla in order to move files into the /var/www/html folder.

    However, I noticed that editing the MYSQL database using just this Terminal interface may not be the best way. So I wanted to run PhpMyAdmin on the EC2 instance. Is this possible?