phpMyAdmin is one of the most popular and widely used web-based database management tools. It a free and open source PHP application that allows the users to manage single or multiple SQL database servers locally or on a remote server using a web browser (GUI). phpMyAdmin is very handy and useful. We can easily create, rename, delete and edit databases, tables or fields, execute SQL commands, import and export tables, create and modify users, etc., all via an easy-to-use GUI.
Login to your Ubuntu 16.04 VPS via SSH as user root
and make sure that you have the latest version of all installed packages
apt-get update && apt-get upgrade
phpMyAdmin requires a LAMP (Linux, Apache, MariaDB/MySQL, PHP) stack. If you don’t have it already installed on your server, you can do it by executing the following commands
apt-get install apache2 php mysql-server
Once Apache, PHP and MySQL are installed, we can go ahead and install phpMyAdmin. The package is included in the official Ubuntu 16.04 repository and it can be easily installed with the command below
apt-get install phpmyadmin
phpMyAdmin will be installed along with its dependencies and all necessary PHP modules.
When you will be prompted to select a web server to configure, hit the space bar to select Apache2 and Enter to confirm and continue
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring phpmyadmin tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x Please choose the web server that should be automatically configured to run phpMyAdmin. x x x x Web server to reconfigure automatically: x x x x [ ] apache2 x x [ ] lighttpd x x x x x x <Ok> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
On the next screen, select YES to configure a database for phpMyAdmin with dbconfig-common
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq Configuring phpmyadmin qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq x x x The phpmyadmin package must have a database installed and configured before it can be used. x x This can be optionally handled with dbconfig-common. x x x x If you are an advanced database administrator and know that you want to perform this configuration x x manually, or if your database has already been installed and configured, you should refuse this option x x Details on what needs to be done should most likely be provided in /usr/share/doc/phpmyadmin. x x x x Otherwise, you should probably choose this option. x x x x Configure database for phpmyadmin with dbconfig-common? x x x x <Yes> <No> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
and finally set a password for the ‘phpmyadmin’ user in MySQL
With this step, the installation of phpMyAdmin is completed. You can access it at
http://yourIPaddress/phpmyadmin and login with your MySQL username and password.