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

-1

1

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?

r8bj3k

Posted 2015-01-01T05:57:49.777

Reputation: 1

Answers

1

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.

slhck

Posted 2015-01-01T05:57:49.777

Reputation: 182 472