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:
- 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…
- Php-Fpm Nginx Ubuntu 18.04 PHP-FPM & Nginx on Ubuntu 18.04 Introduction to PHP-FPM PHP-FPM (FastCGI Process Manager) is an implementation of FastCGI, which is a standard protocol for interfacing external applications with web servers.…
- How To Debian Nginx Php How To Debian Nginx Php Step 1 – Setup Your VPS The first step to setting up your web server is getting your VPS (Virtual Private Server). This is usually…
- Install Mariadb Nginx Debian 9.7 Install Mariadb and Nginx on Debian 9.7 Overview of Installing MariaDB and Nginx on Debian 9.7 Installing MariaDB and Nginx on Debian 9.7 can be an essential step when setting…
- Install Nginx And Php Scract In Docker Install Nginx And PHP Script in Docker What is Docker? Docker is a popular platform for creating, running, and managing applications in a lightweight container system. Originally released as an…
- Nginx Not Found In Service Command Nginx Not Found In Service Command What is Nginx? Nginx is a web server that is widely used for handling large volumes of traffic, and has gained a reputation for…
- Install Nginx Ubuntu 16.04 For Odoo Install Nginx Ubuntu 16.04 For Odoo Install Ubuntu Server 16.04 Before we can install Nginx for Odoo we need to install Ubuntu 16.04 on our server. Ubunutu 16.04 is still…
- 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.…
- 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…
- How To Install Nginx On Ubuntu 18.04 How To Install Nginx on Ubuntu 18.04 Introduction Nginx is a popular open-source web server and reverse proxy software that’s used by millions of websites. It’s the most widely used…
- 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 Phpmyadmin On Nginx Centos 7 Install Phpmyadmin On Nginx Centos 7 Introduction PhpMyAdmin is one of the most popular tools used to manage and administer a MySQL database. It is a web-based application and can…
- 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…
- Emerg Open Etc Nginx Snippets Phpmyadmin.Conf Failed Emerg Open Etc Nginx Snippets Phpmyadmin.Conf Failed What Is Nginx? Nginx is a web server software, similar to Apache, used for serving webpages. It is open source, and is often…
- Nginx Mariadb Php Fpm Debian8 Mariadb Nginx Mariadb Php Fpm Debian8 Mariadb Introduction to the Setup Nginx, MariaDB, and PHP are all popular tools for web development. Nginx is a web server, MariaDB is an open-source…
- Digitalocean Letsencrypt Nginx Ubuntu 18.04 Digitalocean Letsencrypt Nginx Ubuntu 18.04 Introduction Ubuntu 18.04 is the latest version of the popular Linux operating system. Digitalocean is a cloud hosting provider that specializes in hosting and managing…
- Membuat Webserver Nginx Php-Fpm Mariadb Phpmyadmin… Membuat Webserver Nginx Php-Fpm Mariadb Phpmyadmin Pada Freebsd 1. Mengapa Membuat Webserver Nginx Php-fpm Mariadb Phpmyadmin Pada Freebsd FreeBSD adalah sebuah sistem operasi berbasis Unix yang innovatif, kepemimpinan komunitasnya, performanya…
- Failed To Start Nginx Service In Ubuntu Failed to Start Nginx Service in Ubuntu What is Nginx? Nginx is an open-source web server written in C, designed for high performance and stability. Nginx is one of the…
- How To Setup Nginx On Ubuntu How To Setup Nginx On Ubuntu Introduction Nginx is a powerful web server that is very popular among Linux users. It is open-source and comes with great features such as…
- Install Nginx Mysql Phpmyadmin Ubuntu Install Nginx Mysql Phpmyadmin Ubuntu 1. Introduction In today's tutorial, we will show you how to install Nginx, MySQL, and phpMyAdmin on Ubuntu 20.04. Nginx is an open source web…
- 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…
- Digital Ocean Ubuntu Nginx Docker Digital Ocean Ubuntu Nginx Docker What is Digital Ocean? Digital Ocean is a cloud computing provider. It is a great platform for businesses and developers who need to quickly set…
- 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…
- Install Nginx Phpmyadmin Centos 7 Install Nginx Phpmyadmin Centos 7 What is Nginx? Nginx is a web server that is used in Linux-based operating systems such as Centos 7. It is designed to handle high-traffic…
- Perfect Server Ubuntu 18.04 Nginx Perfect Server Ubuntu 18.04 Nginx 1. Introduction Ubuntu is one of the most popular Linux distributions. It is popular due to its user friendliness and availability of excellent free software…
- 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…
- Google Cloud Ubuntu 16 Install Nginx Php Google Cloud Ubuntu 16 Install Nginx Php 1. What is Nginx? Nginx is a powerful open source web server. It is used to serve web pages to the internet and…
- Digitalocean Install Nginx Ubuntu 18.04 Digitalocean Install Nginx Ubuntu 18.04 Introducing DigitalOcean and Nginx DigitalOcean is a virtual cloud server provider, allowing users to spin up virtual servers located in various geographical locations throughout the…
- How To Login Phpmyadmin In Nginx Server Ubuntu How To Login Phpmyadmin In Nginx Server Ubuntu What is Nginx & phpMyAdmin Nginx is a web server software that is commonly used on Linux-based systems, though it works on…
- How Use Nginx Mysql Ubuntu How to Use Nginx, MySQL and Ubuntu What is Nginx? Nginx is an open source web server and reverse proxy software written by Igor Sysoev. It is a popular choice…