How To Install Phpmyadmin In Ubuntu 18.04 Nginx
Introduction
The MySQL database management system is one of the most popular and powerful open source database systems available today. To make managing MySQL databases easier, many webmasters install phpMyAdmin – a web-based graphical interface for MySQL administration. This tutorial will show you how to install phpMyAdmin on Ubuntu 18.04 (Nginx) for easy database management on your server.
A common misconception about phpMyAdmin is that it allows remote access to your MySQL databases. This is not true. phpMyAdmin is simply a graphical interface, accessed only through HTTP using a web browser. It does not provide access to the MySQL command line nor does it allow remote access to the MySQL databases.
Prerequisites
Before you begin with this tutorial, please make sure that you have the following:
- An Ubuntu 18.04 Droplet
- A regular, non-root user with administrative privileges
- Nginx installed on your system
- MySQL installed on your system
To learn more about setting up a user with administrative privileges, consult the Initial Server Setup guide for Ubuntu 18.04. If you have not installed MySQL and Nginx yet, check out the MySQL setup guide and the Nginx Setup guide.
Step 1: Install phpMyAdmin
phpMyAdmin is included in the default package repositories for Ubuntu 18.04. You can install it with the standard apt package manager. To do so, update the local package index and then install the phpmyadmin package.
sudo apt update
sudo apt install phpmyadmin
During the install, you’ll be prompted to choose a webserver for use with phpMyAdmin. To use Nginx, select no by pressing the Space key. Afterward, select yes to restart Nginx. Confirm with yes to finish the configuration.
Once phpMyAdmin has been installed, it’s time to make a few changes to the default configuration. First, open phpMyAdmin’s main configuration file using your favorite text editor:
sudo nano /etc/phpmyadmin/config.inc.php
This file allows you to change a few phpMyAdmin settings. The most common change is to update the authentication type so that phpMyAdmin can access MySQL.
Look for the lines that begin with $i
and type Authentication
, ensuring that the value is set to signon
.
It’s also a good idea to change the value of the AllowNoPassword
line so that a password is required to log in to phpMyAdmin. To do so, change the value from true
to false
.
$cfg['Servers'][$i]['AllowNoPassword'] = false;
When you’re finished making these changes, save and exit the configuration file.
Step 2: Configure the Nginx Server Block
Now that phpMyAdmin has been installed, you’ll need to configure your Nginx server block to serve phpMyAdmin.
Create a new server block using your favorite text editor. Replace example.com
with your domain name.
sudo nano /etc/nginx/sites-available/example.com
Add the following lines to the server block configuration, replacing “example.com” and the PATH TO YOUR FILES placeholder with your domain name and the appropriate filepath:
location /phpmyadmin {
root /PATH/TO/YOUR/FILES;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+.php)$ {
root /PATH/TO/YOUR/FILES;
try_files $uri =404;
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
When you’re finished editing this file, save and exit.
Once you have the server block set up, you can enable it by creating a symbolic link to the file in the /etc/nginx/sites-enabled
directory. To do this, use the following command (substituting your_domain for your domain name):
sudo ln -s /etc/nginx/sites-available/your_domain /etc/nginx/sites-enabled
Now that you have an Nginx server block configured for phpMyAdmin, you can test your Nginx configuration files.
sudo nginx -t
If everything is working properly, your output should look like this:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
When you have tested and saved your changes, enable phpMyAdmin by restarting Nginx.
sudo systemctl restart nginx
Step 3: Logging In To phpMyAdmin
At this point, you should now be able to access phpMyAdmin in your web browser by navigating to http://example.com/phpmyadmin. You can also use your server’s IP address if the domain is not yet pointed at the droplet.
You should see a login page. Enter the username and password of the MySQL user you wish to use. After a successful login, you should be able to manage your MySQL databases through a graphical interface.
Conclusion
You have now installed phpMyAdmin on Ubuntu 18.04 and configured it to use Nginx. You should be able to access phpMyAdmin in your web browser.
FAQs
Q. What is phpMyAdmin?
phpMyAdmin is a web-based MySQL management tool. It allows you to easily create, modify, and delete databases, tables, columns, and more. It also allows you to easily export database data into various formats.
Q. Is phpMyAdmin secure?
phpMyAdmin is very secure. All data is encrypted in transit, and it supports strong authentication, limiting access to only those with the appropriate MySQL user credentials.
Q. What other databases does phpMyAdmin support?
phpMyAdmin supports a variety of other databases, including PostgreSQL, SQLite, and Microsoft SQL Server.
Q. Does phpMyAdmin allow remote access?
No, phpMyAdmin does not allow remote access to your databases. It is only accessible through the web interface, which is served only over a local connection.
Thank you for reading this article. Please take a look at our other articles for more tips and tricks for managing MySQL databases.
Related Posts:
- Install Laravel 5.8 Nginx Php7.3 Install Laravel 5.8 Nginx Php7.3 Overview Installing Laravel 5.8 on a Nginx server running PHP 7.3 can be a tricky task. This tutorial explains how to install the popular open…
- How To Open Var Www Nginx How To Open Var Www Nginx What is Var Www Nginx? Var Www Nginx is a command line program used to create and manage web pages. It is included in…
- How To Configure Cacti Nginx On Debian 9 How To Configure Cacti Nginx On Debian 9 Introduction Cacti is a powerful open source monitoring and graphing solution that combines a powerful backend database, a web interface, and an…
- Install Nginx Php Mysql Phpmyadmin Centos 7 Install Nginx Php Mysql Phpmyadmin Centos 7 A Brief Overview of Centos 7 Centos 7 is a Linux distribution based on the Redhat Enterprise Linux Server, and is a popular…
- Setting Phpmyadmin Di Nginx Debian 9 Setting Phpmyadmin Di Nginx Debian 9 Introduction Nginx is a popular web server created for Unix-like operating systems like Debian. It is used for many web-related activities such as serving…
- Step By Step Install Nginx And Phpmyadmin On Ubuntu Step By Step Install Nginx And Phpmyadmin On Ubuntu Introduction Setting up a web server on Ubuntu is easy and straightforward. Nginx is a popular web server for Ubuntu, and…
- How To Install Nginx And Mariadb 10 How To Install Nginx And Mariadb 10 What is Nginx and MariaDB 10 Nginx is a free, open-source web server that is known for its scalability and performance. It is…
- Cara Install Phpmyadmin Di Nginx Ubuntu Cara Install Phpmyadmin Di Nginx Ubuntu Pengertian PhpMyAdmin PhpMyAdmin adalah antarmuka web-berbasis yang memungkinkan Anda untuk mengelola basis data MySQL dan istilah yang lebih umum dalam pengelolaan basis data SQL.…
- Install Php Nginx Mysql Ubuntu 18.04 Install Php Nginx Mysql Ubuntu 18.04 What is PHP, Nginx, and MySQL PHP is a popular and powerful scripting language that can be used to create dynamic web pages, web…
- Install Phpmyadmin Nginx Centos 8 Install Phpmyadmin Nginx Centos 8 What is Nginx? Nginx is an open source web server that is popular due to its high performance, scalability, stability, and low resource consumption. Nginx…
- Install Nginx Php Mysql Windows Server Install Nginx Php Mysql Windows Server Install Nginx Php Mysql Windows Server Installing Nginx Nginx is a web server that can be used to serve dynamic web pages as well…
- Docker Nginx Php Mysql In Xampp Docker Nginx Php Mysql In Xampp Overview of Docker Nginx Php Mysql in Xampp Docker Nginx Php Mysql in Xampp is a powerful web development platform used for developing complex…
- 404 Nginx Phpmyadmin Centos 7 404 Nginx Phpmyadmin Centos 7 Configuration of Nginx on Centos 7 for Phpmyadmin Setting up Nginx on Centos 7 to work with Phpmyadmin is a very simple process. The first…
- Deploy Laravel In Local Nginx Windows Deploy Laravel In Local Nginx Windows 1. Introduction To Nginx Nginx is a web server that is primarily used to handle web traffic. It is open source, meaning it is…
- Ubuntu 18.04 Nginx Php Mariadb Ubuntu 18.04 Nginx, Php, and Mariadb Understanding Ubuntu 18.04 Ubuntu 18.04 is the latest version of the popular open-source Linux distribution. It is based on Debian and is known for…
- Create Domain Using Nginx Virtualmin Title: Create Domain Using Nginx Virtualmin Create Domain Using Nginx Virtualmin What is Nginx Virtualmin? Nginx Virtualmin is an automated website management platform from Virtualmin. It provides a powerful web…
- Cara Install Phpmyadmin Di Nginx Windows Cara Install Phpmyadmin Di Nginx Windows Instalasi Nginx Nginx adalah salah satu aplikasi web server yang populer dan banyak digunakan di sistem operasi Windows. Untuk menginstal Nginx di Windows, Anda…
- Vps Webserver Nginx Php7 Mysql Vps Webserver Nginx Php7 Mysql What Is VPS Webserver? A VPS webserver is a Virtual Private Server (VPS) that has been configured to act as a web server. A VPS…
- Install Php Nginx Ubuntu 12.04 Install Php Nginx Ubuntu 12.04 Introduction Welcome to our guide on How to install PHP, Nginx & MySQL on Ubuntu 12.04 LTS. This guide should work on other Linux VPS…
- Install Wordpress On Nginx Ubuntu Install Wordpress On Nginx Ubuntu Introduction WordPress is a popular open-source blogging platform and content management system (CMS). It is made to be used on the internet, and it is…
- Digital Ocean Ubuntu Server Nginx Docker Digital Ocean Ubuntu Server Nginx Docker Understanding Digital Ocean Digital Ocean is a cloud service provider that focuses on simplifying web infrastructure for cloud developers. They offer a platform where…
- Centos 6 Nginx Phpmyadmin Forbideen Centos 6 Nginx Phpmyadmin Forbidden Introduction CentOS 6, an open-source Linux operating system, is one of the most popular web server operating systems. It is considered to be a reliable…
- Install Squirellmail On Nginx Ubuntu Install Squirrelmail On Nginx Ubuntu 1. What is Squirrelmail? Squirrelmail is a webmail application written in PHP. It is often used as an email client for the Linux operating system…
- Install Phpmyadmin Nginx Ubuntu 16.04 Install Phpmyadmin Nginx Ubuntu 16.04 What is PhpMyAdmin? PhpMyAdmin is an open-source software for managing MySQL databases. It can be used to add, modify, and delete databases, tables, and columns.…
- Debian Install Nginx Php Mysql Phpmyadmin On Debian 9 Debian Install Nginx Php Mysql PhpMyAdmin On Debian 9 What Is Debian 9? Debian 9 (codenamed “stretch”) is the most recent stable version released by the Debian project, the developers…
- Can I Install Phpmyadmin In Nginx Can I Install Phpmyadmin In Nginx? PHPmyadmin is a web-based management tool for databases such as MySQL and MariaDB. It is a popular tool for web developers and database administrators…
- Install Phpmyadmin For Nginx Debian 8 Install Phpmyadmin For Nginx Debian 8 Introduction The Nginx web server popularly known as Nginx is a lightweight web server written in C programming language. It is an open source…
- Install Pdo_Mysql Ubuntu Nginx Install Pdo_Mysql Ubuntu Nginx What is Pdo_Mysql? PDO_Mysql is a driver for the PHP Data Objects (PDO) extension that provides a database abstraction layer for working with MySQL databases.PDO_Mysql provides…
- Docker Compose Php Mysql Nginx Docker Compose Php Mysql Nginx Introduction to Docker Compose for PHP, MySQL and Nginx Docker Compose is a tool for scripting and managing the deployment of multi-container applications. It is…
- Install Nginx 1.16 Ubuntu Install Nginx 1.16 Ubuntu Introduction to Nginx 1.16 Nginx 1.16 is a web server that helps you to serve web content quickly, efficiently and securely. It is especially popular with…