How to Add an Extra Layer of Security on PhpMyAdmin Login Interface

MySQL is the world’s most used open source database management system on the Linux ecosystem and at the same time Linux newbies find it difficult to manage from the MySQL prompt.

PhpMyAdmin was created, is a web based MySQL database manage application, which provides a easy way for Linux newbies to interact with MySQL through a web interface. In this article, we’ll share how to secure phpMyAdmin interface with password protect on Linux systems.

Before you move forward with this article, we assume that you have completed a LAMP (Linux, Apache, MySQL/MariaDB, and PHP) and PhpMyAdmin installation on your Linux server. If not, you can follow our below guides to install LAMP stack on your respective distributions..

Once you are done with all these above steps, you are ready to get started with this article.

Just by adding the following lines to /etc/apache2/sites-available/000-default.conf in Debian or /etc/httpd/conf/httpd.conf in CentOS will require basic authentication AFTER confirming the security exception but BEFORE accessing the login page.

Thus, we will be adding an extra layer of security, also protected by the certificate.

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.