How to Install PhpMyAdmin on a LEMP Server

Introduction

PhpMyAdmin is a free php tool for handling the MySQL over web. It offers a wide range of operations with an intuitive web interface.

Before starting to install phpMyAdmin, make sure that you already have LEMP stack installed on your VPS. In case if you don’t  refer this tutorial to get it done.

Install phpMyAdmin

Begin the installation process by downloading the program from apt-get:

sudo apt-get install phpmyadmin

While installing, you may be asked whether to configure the database with dbconfig. You can choose ‘yes’ to confirm.

You will also be asked to enter the MySQL’s database password. Click ok after entering the password.

When phpmyadmin asks you to choose a server either apache or lighttpd, you can opt to choose neither of them by pressing the tab.

 

Configuring PhpMyAdmin

 

Now that you have installed phpmyadmin on your server, you can go ahead and configure it for better access.

First of all, create a symbolic link between phpmyadmin and your site’s directory.

sudo ln -s /usr/share/phpmyadmin/ /usr/share/nginx/www

Most probably it will be located in nginx default directory. If it’s not, link it with proper place.

Now, restart Nginx:

sudo service nginx restart

Verify the set up by accessing phpmyadmin by pointing to yourdomainname/phpmyadmin. You will be able to get this screen:

 

phpmyadmin

 

You can log in using your MySQL credentials.

 

 

KB Admin has written 46 articles