How to install phpmyadmin in Amazon EC2?
June 19, 2020 / Eternal Team
Requirements for Installing phpMyAdmin on Ubuntu
PHP 7.2.24-0ubuntu0.18.04.4 (cli) (built: Apr 8 2020 15:45:57) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24-0ubuntu0.18.04.4, Copyright (c) 1999-2018, by Zend Technologies
Install phpMyAdmin from Ubuntu Packages
Step 1: Update Package Index
First, we need to make sure our local server is pulling the latest updates.
$ sudo apt-get update
Step 2: Install phpMyAdmin Package
Now we can install the latest version of phpMyAdmin.
$ sudo apt-get install -y phpmyadmin
Step 3: Configure phpMyAdmin Package
- After installing phpMyAdmin, you will be presented with the package configuration screen.
- Press the SPACEbar to place an “*” beside “apache2.”
- Press TAB to highlight “OK,” then hit ENTER.


- The installation process will continue until you’re back at another package configuration screen.
- Select “Yes” and then hit ENTER at the dbconfig-common screen.

- Select “Yes” and hit ENTER.
- You will be prompted for your database administrator’s password.
- Type it in, hit TAB to highlight “OK,” and then press ENTER.
- Enter your DB administrator’s password.
- Next, enter a password for the phpMyAdmin application itself.

- Enter the password you’d like to use to access the phpMyAdmin interface.
- Confirm the phpMyAdmin application password.

- Confirm your phpMyAdmin password.
- After the installation process completes, it adds the phpMyAdmin configuration file here.
/etc/apache2/conf-enabled/phpmyadmin.conf
Restart Apache
Now we should restart the Apache web server for changes to take affect
$ sudo service apache2 restart
Access phpMyAdmin for the First Time
- Now you can log in to phpMyAdmin by going to your server followed by /phpmyadmin.
- You can just use http://YOUR_SERVER_IP/phpmyadmin if you don’t have domains set up yet.

- Log in with the root user and the password you set for the phpMyAdmin application.