On MySQL as well as within regular Linux systems, the root account is a special administrative account with unrestricted access to the system. By obfuscating phpMyAdmin’s real location on the server, you’re securing its interface against automated scans and manual brute-force attempts. To change phpMyAdmin’s interface URL, we will rename this symbolic link.įirst, let’s navigate to the Nginx document root directory and list the files it contains to get a better sense of the change we’ll make: With our phpMyAdmin installation, we’ve created a symbolic link pointing to /usr/share/phpmyadmin, where the actual application files are located. Changing the interface’s URL from /phpmyadmin to something non-standard will make it much harder for automated scripts to find your phpMyAdmin installation and attempt brute-force attacks. Bots will scan for common paths, like phpmyadmin, pma, admin, mysql and such. One of the most basic ways to protect your phpMyAdmin installation is by making it harder to find. Step 2 - Changing phpMyAdmin’s Default Location In the following sections of this guide, we’ll see a few different ways in which we can make our phpMyAdmin installation more secure. Because of phpMyAdmin’s popularity, and the large amounts of data it may provide access to, installations like these are common targets for attacks. However, by installing a web interface, we’ve exposed our MySQL database server to the outside world. Your phpMyAdmin installation should be completely functional at this point. We’ll see how to disable root login in a subsequent step of this guide. Note: Logging into phpMyAdmin as the root MySQL user is discouraged because it represents a significant security risk. If you need help creating MySQL users, check this guide on How To Manage an SQL Database. As mentioned before, phpMyAdmin handles authentication using MySQL credentials, which means you should use the same username and password you would normally use to connect to the database via console or via an API. Let’s start by updating the server’s package index with: We’re going to use the default Ubuntu repositories to achieve this goal. The first thing we need to do is install phpMyAdmin on the LEMP server. Once you have met these prerequisites, you can go ahead with the rest of the guide. Warning: If you don’t have an SSL/TLS certificate installed on the server and you still want to proceed, please consider enforcing access via SSH Tunnels as explained in Step 5 of this guide. If you do not have an existing domain configured with a valid certificate, you can follow this guide on securing Nginx with Let’s Encrypt on Ubuntu 18.04. Access to this server as a non-root user with sudo privileges.īecause phpMyAdmin handles authentication using MySQL credentials, it is strongly advisable to install an SSL/TLS certificate to enable encrypted traffic between server and client.If you haven’t set up your server yet, you can follow the guide on installing a LEMP stack on Ubuntu 18.04. An Ubuntu 18.04 server running a LEMP (Linux, Nginx, MySQL and PHP) stack secured with ufw, as described in the initial server setup guide for Ubuntu 18.04.Prerequisitesīefore you get started with this guide, you’ll need the following available to you: We will go over some security measures you can take in this tutorial so that you can make informed decisions. Because phpMyAdmin is a widely-deployed PHP application, it is frequently targeted for attack. Note: There are important security considerations when using software like phpMyAdmin, since it runs on the database server, it deals with database credentials, and it enables a user to easily execute arbitrary SQL queries into your database. In this guide, we’ll discuss how to install phpMyAdmin on top of an Nginx server, and how to configure the server for increased security. PhpMyAdmin was created so that users can interact with MySQL through an intuitive web interface, running alongside a PHP development environment. While many users need the functionality of a database system like MySQL, interacting with the system solely from the MySQL command-line client requires familiarity with the SQL language, so it may not be the preferred interface for some. How to Install and Secure phpMyAdmin with Nginx on an Ubuntu 18.04 server Introduction
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |