The right way to set up Adminer on Ubuntu 20.04 LTS


Get real time updates directly on you device, subscribe now.

How do I set up Adminer on Ubuntu 20.04 LTS for database administration over the net?

Adminer (previously referred to as phpMinAdmin) is an open-source and free web-based database administration software. It’s written in PHP. As in comparison with phpMyAdmin, it’s a light-weight utility with robust safety and person expertise in thoughts. This tutorial describes how you can set up Adminer on Ubuntu 20.04 LTS Linux server for MySQL or MariaDB.

Process to put in Adminer on Ubuntu 20.04 Linux server

Replace your Ubuntu server operating sudo apt replace && sudo apt improve
Ensure that Apache server put in and configured on Ubuntu
Allow configuration, run: sudo a2enconf adminer
Set up Adminer by typing the sudo apt set up adminer command

Clearly, you want Apache or every other net server put in. Right here is how you can set up Apache 2 on Ubuntu 20.04 LTS. Now that Apache net server put in and operating allow us to get our fingers soiled by putting in Adminer.

Putting in Adminer

First replace the system utilizing the apt command/apt-get command after which set up Adminer software program:
sudo apt replace
sudo apt improve
sudo apt set up adminer
How to install Adminer on Ubuntu 20.04 Linux using apt command
Please word that aside from Apache PHP required to run Adminer. Therefore, apt put in PHP and routinely configured it too. For different net servers, that you must carry out handbook configurations. Use the cat command to confirm that PHP 7.four module is enabled:
a2query -m php7.four
php7.four (enabled by maintainer script)
cat /and so forth/apache2/mods-enabled/php7.four.load,conf
Config information:

# Conflicts: php5
# Relies upon: mpm_prefork
LoadModule php7_module /usr/lib/apache2/modules/
SetHandler utility/x-httpd-php

SetHandler utility/x-httpd-php-source
# Deny entry to uncooked php sources by default
# To re-enable it is beneficial to allow entry to the information
# solely in particular digital host or listing
Require all denied

# Deny entry to information with out filename (e.g. ‘.php’)
Require all denied

# Operating PHP scripts in person directories is disabled by default
# To re-enable PHP in person directories remark the next strains
# (from to .) Do NOT set it to On because it
# prevents .htaccess information from disabling it.

php_admin_flag engine Off

Configuring Adminer

To activate adminer app run any one of many following a2enconf command
sudo a2enconf adminer.conf
## OR ##
sudo a2enconf adminer

Enabling conf adminer.
To activate the brand new configuration, that you must run:
systemctl reload apache2

Now all you must do is restart or reload the Apache 2 server, enter:
sudo systemctl reload apache2
The default config file is situated at /and so forth/apache2/conf-enabled/adminer.conf and considered utilizing the cat command:
cat /and so forth/apache2/conf-enabled/adminer.conf

# Adminer on Ubuntu 20.04 #
Alias /adminer /and so forth/adminer

Require all granted
DirectoryIndex conf.php

Check the set up

You possibly can entry the Adminer app utilizing the next URL format:
Adminer running on Ubuntu 20.04
Now all you must do is present database kind (MySQl, PGSQL), server IP/hostname, database username/password, and database title to login and handle the database:
adminer mysql login

A word about firewall configuration

Say Apache/adminer is operating on the host having IP deal with and database server is at 172.16.three.1:3306, then permit entry utilizing the ufw (kind command on mysql/mariadb server):
ufw permit from to 172.16.three.1 port 3306 proto tcp remark ‘permit mysql entry for Adminer/Apache IP’
Subsequent, that you must ensure that database permissions and password are appropriate, in any other case admire wouldn’t be capable to hook up with your database server. In different phrases, create an admin person for admirer as follows (once more kind these on in your mysql/mariadb server). The syntax is:

## IF ADMINER/Apache server IP IS, THEN CREATE log IN USER named vivek ##
CREATE USER ‘vivek’@‘’ IDENTIFIED BY ‘Super_Secret_PassWord_Here’;

Log in session

Installed Adminer on Ubuntu 20.04 and Logged in using vivek userAdminer in motion


On this tutorial, you discovered how you can set up Adminer on Ubuntu 20.04 Linux server. I strongly recommend that you just run Adminer over HTTPS-based session (see “How To Safe Apache with mod_md Let’s Encrypt on Ubuntu 20.04 LTS“) and password defend your area or /adminer/ URL for safety causes. See Adminer web site right here for more information.


Posted by: Vivek Gite

The creator is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a coach for the Linux working system/Unix shell scripting. Get the newest tutorials on SysAdmin, Linux/Unix and open supply matters through RSS/XML feed or weekly e-mail e-newsletter.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More