Install LAMP Stack (Apache, MariaDB, php, phpMyAdmin) on Ubuntu 14.04, 14.10, 15.04, 15.10 & 16.04

5) Install phpMyAdmin

phpMyAdmin is a free open-source web-based administration tool for managing the MySQL, MariaDB servers which will help us to manage the database easily.

[Install phpMyAdmin]
$ sudo apt-get install phpmyadmin

In my case, i’m using so select the webserver to configure phpMyAdmin automatically.
install-lamp-on-ubuntu-16-04-phpmyadmin-1

Make sure your system should have database installed (MySQL, MariaDB, etc) before proceeding phpMyAdmin installation. Here choose Yes to configure database for phpmyadmin with dbconfig-common.
install-lamp-on-ubuntu-16-04-phpmyadmin-2

Enter MySQL application password for phpmyadmin:
install-lamp-on-ubuntu-16-04-phpmyadmin-3

Re-enter password:
install-lamp-on-ubuntu-16-04-phpmyadmin-4

Open your web browser and navigate to http://localhost/phpMyAdmin or http://your-server-ip-address/phpMyAdmin or http://127.0.0.1/phpMyAdmin
install-lamp-on-ubuntu-16-04-phpmyadmin-5

After logged into phpmyadmin you will get the below screen, here you can manage all the databases.
install-lamp-on-ubuntu-16-04-phpmyadmin-6

If phpMyAdmin is not working, try the blow trick to make it work.

[Include the phpmyadmin configuration into apache]
$ sudo nano /etc/apache2/apache2.conf
Include /etc/phpmyadmin/apache.conf

[Restart apache service]
$ sudo systemctl restart apache2

If you get 404 Not Found error message, try to reconfigure it. This will have more steps do it properly.
install-lamp-in-ubuntu-15-10-11

[Reconfigure the phpmyadmin]
$ sudo dpkg-reconfigure -plow phpmyadmin

[Restart apache service]
$ sudo systemctl restart apache2

If the above trick didn’t work, try the below one.

[Include the phpMyAdmin-shipped Apache configuration into Apache]
$ sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

[Reload apache service]
$ sudo /etc/init.d/apache2 reload

We are preparing all articles in-depth to understand by all level/stage Linux administrators. If the article is useful for you, then please spend less than a minute to share your valuable comments in our commenting section.

Please stay tune with us…Good Luck.

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...