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 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 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.…
- Nginx Always Displaying Default Page In Ubuntu Nginx Always Displaying Default Page In Ubuntu Introduction Ubuntu is one of the most popular Linux distributions and an immensely powerful and versatile operating system. It has a great package…
- 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…
- 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…
- Bash Install Nginx On Ubuntu How To Install Nginx On Ubuntu What is Nginx? Nginx is a web server that is gaining popularity in the world of web hosting. Nginx is an open source web…
- Install Postgis Ubuntu 18.04 Nginx Install Postgis Ubuntu 18.04 Nginx What is Postgis? Postgis is a Postgres-based open source geographic information system (GIS) that enables users to store, query, and analyze spatial data stored in…
- 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.…
- Webdav Nginx Ubuntu 16.04 Webdav Nginx Ubuntu 16.04 Introduction to Webdav with Nginx in Ubuntu 16.04 The ever-evolving world of the internet has given us a powerful platform to share information, media, and files…
- Ubuntu 18.04 Wordpress Nginx Ubuntu 18.04 Wordpress Nginx Apa Itu Ubuntu 18.04 ? Ubuntu 18.04 adalah versi terbaru dari Ubuntu, sebuah sistem operasi sumber terbuka yang dapat Anda gunakan di komputer Anda. Ubuntu 18.04…
- Install Mysql Pada Nginx Pada Ubuntu Install Mysql Pada Nginx Pada Ubuntu Overview of Nginx and Its Benefits Nginx is a web server, reverse proxy server, and mail proxy server application that is open-source and available…
- 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…
- 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…
- 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…
- Centos 7 Install Nginx Php 7 Centos 7 Install Nginx Php 7 Nginx Server Overview and Prerequisites Nginx is a highly popular open source web server and reverse proxy software, known for its scalability and performance…
- Making Service Like Nginx Mariadb Runs On Boot Making Service Like Nginx Mariadb Runs On Boot Introduction to Services A service is a software application or package that needs to be running in order for other software applications…
- 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…
- Ubuntu 16 Bind9 Nginx Subdomain Ubuntu 16 Bind9 Nginx Subdomain Overview Ubuntu is a popular Linux-based operating system, often used in web hosting. Bind 9 is a DNS server, commonly used in Ubuntu, that helps…
- Ubuntu Server Postgresql Nginx Php Digitalocean Laravel Ubuntu Server Postgresql Nginx Php Digitalocean Laravel Introduction To The Stack Ubuntu Server, Postgresql, Nginx, PHP, Digitalocean and Laravel are an exceptional combination of elements that, when put together, make…
- Nginx Wordpress Ubuntu 18.04 Nginx Wordpress Ubuntu 18.04 Introduction to Nginx Nginx is a web server software for hosting websites and applications. It is open-source and highly configurable, making it a popular choice for…
- 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…
- Server Admin Panel For Nginx Server Admin Panel For Nginx What is Nginx? Nginx is an open source web server and content management system developed by Igor Sysoev in 2004. It is known for its…
- Webmin Module For Nginx Web Server Webmin Module For Nginx Web Server Introduction to the Nginx Web Server Nginx is an open source web server and reverse proxy that offers powerful performance in a lightweight package.…
- 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 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 Nginx And Php On Ubuntu 18.04 Install Nginx And Php On Ubuntu 18.04 Introduction In this article, we will guide you on how to install Nginx and php on Ubuntu 18.04. Nginx is a popular web…
- Install Nginx And Php On Ubuntu Install Nginx And Php On Ubuntu A Comprehensive Tutorial to Install Nginx And Php On Ubuntu Nginx and PHP are two of the most popular web server and scripting language…
- Cacti Nginx Php-Fpm Alpine Cacti Nginx Php-Fpm Alpine What is Cacti? Cacti is an open-source network monitoring and infrastructure management solution that offers an easy-to-use graphical interface for graphing, logging, and analyzing network traffic.…
- How To Set Rails On Nginx Ubuntu 18.04 How To Set Rails On Nginx Ubuntu 18.04 Step 1: Install Ruby Using RVM The first step for setting up Ruby on Rails on an Ubuntu 18.04 server with Nginx…
- 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…