Install and Configure Adminer on Ubuntu 22.04: Best Database Management Tool
In the realm of database management, choosing the right tool can significantly impact productivity and efficiency. When it comes to lightweight, user-friendly, high-performing MySQL database management tools, Adminer has gained wide popularity and delivers many improvements as compared to phpMyAdmin. It offers a streamlined interface and efficient resource utilization, making it an attractive alternative for developers and administrators alike.
As an open-source database management tool, it is also free to use and is written in PHP. This database management tool is easy to set up and requires simple requirements. To guide you through the installation and configuration process, follow the steps below.
To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with Ubuntu 22.04.
Also, you need to have LAMP Stack installed on your server. For this purpose, you can follow our guide on How To Install LAMP Stack on Ubuntu 22.04.
1. Set Root Database Password for Adminer
When you are done with the requirements, run the command below to install an additional PHP extension:
sudo apt install php-curl libapache2-mod-php php-cli php-mysql php-gd -y
Then, you need to set a root database password for Adminer. This will help you to manage all available databases using Adminer. To do this, log in to your MariaDB shell:
sudo mysql -u root -p
Now, set the password for the root user with the command below:
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("<password>");
Important: Replace <password>
with your desired root password.
Next, flush the privileges and exit from the MariaDB shell:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;
2. Install Adminer on Ubuntu 22.04
Adminer packages are available in the default Ubuntu repository. You can easily install it by using the command below:
sudo apt install adminer -y
Then, enable the Apache configuration file for Adminer on Ubuntu 22.04:
sudo a2enconf adminer
Finally, restart Apache to apply the changes:
sudo systemctl restart apache2
3. Access Adminer Web Interface
At this point, you can access the Adminer web interface by typing your server’s IP address in your web browser followed by /adminer
:
http://<server-ip-address>/adminer
Important: Replace <server-ip-address>
with the actual IP address of your Ubuntu 22.04 server.
You will see the Adminer Login screen. You should enter the root
as the username and the password that you have configured for the Adminer.

After login, you will have the Dashboard to access all the available databases. You can delete or create a database as well. However, the interface of Adminer is not rich as that of PhpMyAdmin, yet simple, easy to navigate, understandable, and not confusing.

4. Uninstall Adminer from Ubuntu 22.04
If you don’t want the Adminer Database system manager anymore on your Ubuntu system; then you can remove it completely by using the commands below:
sudo apt autoremove --purge adminer
Those who also want to uninstall Apache, MariaDB, and PHP, use the following commands:
sudo systemctl stop apache2 mariadb
sudo apt autoremove --purge mariadb-server php* apache2
Alternative Solutions for Database Management
While Adminer is a fantastic lightweight option, several other tools offer similar or even enhanced functionality. Here are two alternative approaches to managing your databases on Ubuntu 22.04:
1. Using Dbeaver (Universal Database Tool):
Dbeaver is a free, open-source, and universal database tool that supports a wide range of database systems, including MySQL, PostgreSQL, SQLite, Oracle, SQL Server, and many more. Unlike Adminer, which is specifically designed for web-based access and primarily focuses on MySQL and related databases, Dbeaver provides a desktop application with a more comprehensive feature set and broader database compatibility.
Explanation:
Dbeaver connects directly to your database server using JDBC drivers. It provides a rich GUI for managing databases, tables, views, stored procedures, and other database objects. It also includes features like SQL editor with syntax highlighting, data export/import, and ER diagrams. The installation process may involve downloading the package, adding the repository and then installing it.
Installation:
# Add the Dbeaver repository
wget -O - https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add -
echo "deb https://dbeaver.io/debs/dbeaverEE ubuntu jammy" | sudo tee /etc/apt/sources.list.d/dbeaver.list
# Update the package list
sudo apt update
# Install Dbeaver
sudo apt install dbeaver-ee
Configuration and Use:
After installation, launch Dbeaver. To connect to your MySQL database, create a new connection, select MySQL, and provide the connection details (host, port, database name, username, password). Dbeaver will then allow you to browse and manage your database objects through its GUI.
Advantages over Adminer:
- Broader database support.
- More comprehensive feature set (SQL editor, data import/export, ER diagrams).
- Desktop application for better performance and offline access (potentially).
Disadvantages over Adminer:
- Heavier resource footprint.
- More complex interface (can be overwhelming for simple tasks).
- Requires a desktop environment (not suitable for purely headless servers unless using X forwarding).
2. Using a Dockerized phpMyAdmin:
While this guide focuses on Adminer, another popular option for managing MySQL databases is phpMyAdmin. While traditionally installed directly on the server like Adminer, running phpMyAdmin in a Docker container offers isolation, simplifies management, and avoids potential conflicts with other PHP applications on your server.
Explanation:
Docker allows you to package phpMyAdmin along with all its dependencies into a container. This container can then be easily deployed and run on any system that has Docker installed. This approach ensures a consistent environment for phpMyAdmin, regardless of the underlying operating system or other installed software.
Installation:
First, ensure Docker is installed on your Ubuntu 22.04 server. If not, install it:
sudo apt update
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker
Then, run the phpMyAdmin Docker container:
docker run --name phpmyadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
Configuration and Use:
This command will download the phpMyAdmin image, create a container named "phpmyadmin," expose it on port 8080, and start the container in detached mode (-d).
You can then access phpMyAdmin in your web browser at http://<server-ip-address>:8080
. The -e PMA_ARBITRARY=1
environment variable allows you to connect to any MySQL server without pre-configuring it. You will be presented with the phpMyAdmin login screen, where you can enter your MySQL credentials.
Advantages over traditional phpMyAdmin and Adminer:
- Isolation: Prevents conflicts with other PHP applications.
- Simplified management: Easy to deploy, update, and remove.
- Consistent environment: Ensures phpMyAdmin runs the same way regardless of the underlying system.
- Avoids the need to install and configure PHP directly on the server.
Disadvantages over Adminer:
- Requires Docker knowledge.
- Slightly more resource-intensive than a direct Adminer installation.
Conclusion
Adminer is a valuable tool for database management, offering a lightweight and user-friendly interface for interacting with your MySQL databases on Ubuntu 22.04. It’s simple installation and configuration make it an excellent choice for many users.
At this point, you have learned to Install and Configure Adminer on Ubuntu 22.04. However, remember that other options like Dbeaver and Dockerized phpMyAdmin offer alternative approaches with their own sets of advantages and disadvantages. Choose the tool that best fits your specific needs and technical expertise. Ultimately, the best database management tool is the one that empowers you to efficiently and effectively manage your data.
You may also like these articles:
- How To Install OpenCV on Ubuntu 22.04
- Install and Use Sysdig on Ubuntu 22.04
- Ghost CMS Install Ubuntu 22.04
- Install OnlyOffice Ubuntu 22.04
- SQL Server Setup Without Using Docker Ubuntu 22.04
- NFS Server and Client Setup Ubuntu 22.04
- Install Deepin Desktop Ubuntu 22.04