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:
- Wordpress Nginx Ubuntu 18.04 Wordpress Nginx Ubuntu 18.04 Overview WordPress is a popular web software used by millions of people around the world. It allows users to easily create and manage websites without the…
- 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…
- 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…
- Docker Install Nginx Mysql Php Docker Install Nginx Mysql Php What is Docker? Docker is an open-source platform for automating the deployment of applications as lightweight, portable, and self-sufficient containers. It bundles applications and all…
- Vmware Files Freebsd Nginx Mysql Vmware Files Freebsd Nginx Mysql Introduction VMWare is a powerful virtualization platform that can help businesses reduce capital outlay for IT resources. One of the main benefits of using VMWare…
- Completely Uninstall Phpmyadmin On Nginx Ubuntu 18.04 Completely Uninstall PhpMyAdmin On NGINX Ubuntu 18.04 Introduction PhpMyAdmin is a very popular web-based graphical tool for managing MySQL databases in the Ubuntu operating system. It is used by web…
- 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…
- 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…
- 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.…
- 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…
- 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…
- 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 On Nginx Ubuntu Install Phpmyadmin On Nginx Ubuntu What Is Phpmyadmin? Phpmyadmin is a free, open source web application written in PHP specifically designed to help manage MySQL databases. It is a powerful…
- 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…
- Install Phpmyadmin Debian 10 Nginx Install Phpmyadmin Debian 10 Nginx What is PhpMyAdmin? PhpMyAdmin is a web-based administration tool for managing MySQL databases. It is one of the most popular applications in the Apache, Nginx,…
- How To Install Cachet Nginx How To Install Cachet Nginx Overview Cachet is an open-source monitoring platform that is widely used by web developers, DevOps engineers, and system administrators for monitoring the performance of a…
- Install Phpmyadmin Ubuntu 18.04 Nginx Install PhpMyAdmin Ubuntu 18.04 Nginx What is PhpMyAdmin? PhpMyAdmin is an open source software written in PHP that provides a graphical web-based interface for accessing and managing your MySQL or…
- 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…
- How To Install Nginx Maridb 10 On Ubuntu 16.04 Lts How To Install Nginx Maridb 10 On Ubuntu 16.04 Lts Step 1 — Installing Nginx The first step in installing Nginx and MariaDB 10 on Ubuntu 16.04 is installing Nginx.…
- 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…
- 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.…
- Setting Php Mysql Nginx Di Windows Server Setting PHP MySQL Nginx Di Windows Server Prerequisites Before you begin installing and configuring PHP, MySQL and Nginx on your Windows Server, there are several prerequisites you need to verify.…
- 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…
- Add Root Password Mysql Nginx Ubuntu 16.04 Add Root Password Mysql Nginx Ubuntu 16.04 What is a root password? In the context of computer security, a root password is a user account that is given access to…
- Install Webmin Plugin Nginx Ubuntu Install Webmin Plugin Nginx Ubuntu What is Nginx? Nginx is a web server that runs on the Linux operating system. It is a popular web server software and can handle…
- Install Wordpress On Ubuntu 18.04 Nginx Install WordPress On Ubuntu 18.04 Nginx Introduction To Ubuntu And Nginx Ubuntu is a popular open-source operating system which has gained immense popularity over the years. It is easy to…
- 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…
- 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…
- Linux Nginx Mysql Php Lemp Linux Nginx Mysql Php Lemp What is Linux, Nginx, MySQL, PHP (LEMP)? Linux, Nginx, MySQL, PHP (LEMP) is a software stack combination of Linux, Nginx, MySQL, and PHP, commonly referred…
- How To Install Phpmyadmin With Nginx On Windows 10 How To Install Phpmyadmin With Nginx On Windows 10 What Is Phpmyadmin? PhpMyAdmin is a popular open source tool used for managing MySQL databases, created written in PHP language. It…