What is a phpMyAdmin?

It's PHP-based front-end control panel wherein you will be capable of managing your MySQL databases and users, you can import and export backups for your database, browse SQL activity, so searches, and more. It's the great tool for beginners for the maintenance and interface of MySQL. Below you will figure out the most recommended method in order for you to install the phpMyAdmin from the Ubuntu packages, and learn how to secure your phpMyAdmin.


You need to meet the basic requirements first before installing phpMyAdmin

  • A LAMP stack (Linux, Apache, MySQL, and PHP) installed
  • PHP 5.2.0 or newer


$ php -v

PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11)

Copyright (c) 1997-2014 The PHP Group

Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies


The PHP mysql or mysqli extensions


$ php -m | grep mysql

mysql

mysqli


MySQL 5.0.1 or newer


$ mysql -v

Welcome to the MySQL monitor.  Commands end with , or \g.

Your MySQL connection id is 39

Server version: 5.5.41-0ubuntu0.14.04.1-log (Ubuntu)


How to install phpMyAdmin from Ubuntu packages? This it the most recommended process for installation in the production environment.


First thing to do is to update the Package Index

sudo apt-get update


Second is to Install phpMyAdmin Package

sudo apt-get install -y phpmyadmin


Then Configure phpMyAdmin Package

After installing phpMyAdmin, you will see it with the package in the configuration screen.


After the installation process completes, you can find here the phpMyAdin configuration file:

/etc/apache2/conf-enabled/phpmyadmin.conf


Check if the PHP mcrypt module is in use:

php -m | grep 

mcrypt


If you don’t see results, install the PHP mcrypt module with:

sudo php5enmod 

mcrypt


Now when we check, you should see mcrypt enabled:

$ php -m | grep mcrypt

mcrypt


Now you can restart the Apache web server for changes to take affect:

sudo service apache2 restart


Conclusion for phpMyAdmin

Now you've learned the simple guide and steps below to guide you in installing phpMyAdmin on Ubuntu! Once you've successfully installed phpMyAdmin on Ubuntu, you can now do your thing in their advanced features. You can see it in the tab "Status", it will be display in the the current MySQL queries that are running on the server, and also in the server uptime, or the number of connection in the MySQL Server.  Check out the official phpMyadmin documentation for more using phpMyAdmin.