Set up Adminer on Debian 11: Best Database Manager

Posted on

Set up Adminer on Debian 11: Best Database Manager

Set up Adminer on Debian 11: Best Database Manager

In this guide, we’ll walk you through how to Set up Adminer on Debian 11. Adminer is a tool for managing the contents of MySQL databases, previously known as phpMinAdmin. It’s a single, tiny PHP file.

Adminer provides:

  • Support for multiple database systems.
  • A simple and intuitive user interface.
  • Easy deployment (single file).
  • Security features.
  • Performance efficiency.

Unlike phpMyAdmin, which primarily supports MySQL and MariaDB database management, Adminer also extends its support to other databases, including PostgreSQL, SQLite, MS SQL, Oracle, SimpleDB, Elasticsearch, MongoDB, and Firebird. It is also available in 43 languages, making it a versatile choice for diverse teams and projects. The focus of this article is how to Set up Adminer on Debian 11.

Now, follow the guide steps below on the Orcacore website to Set up Adminer on Debian 11.

Before we begin, ensure you have the following prerequisites in place:

  • A Debian 11 server.
  • Login access to the server as a non-root user with sudo privileges. You can refer to our guide on Initial Server Setup with Debian 11 for assistance.
  • A LAMP Stack installed on your server. Consult our guide on How To Install LAMP Stack on Debian 11 for step-by-step instructions.

1. Set root Database password for Adminer

Once you’ve satisfied the prerequisites, execute the following command to install additional PHP extensions:

sudo apt install php-curl libapache2-mod-php php-cli php-mysql php-gd -y

Next, 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");

Replace "password" with your desired password.

Next, flush the privileges and exit from the MariaDB shell:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> exit;

2. Install Adminer on Debian 11

Adminer packages are available in the default Debian repository. You can easily install it using the command below:

sudo apt install adminer -y

Then, enable the Apache configuration file for Adminer on Debian 11:

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

Replace <server-ip-address> with the actual IP address of your server.

You will see the Adminer default Login screen. You should enter root as the username and the password that you have configured for the Adminer.

Adminer default Login Screen
Adminer Default Login Screen

After accessing the Adminer default 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 as rich as that of PhpMyAdmin, yet simple, easy to navigate, understandable, and not confusing.

Adminer dashboard
Adminer Dashboard

4. Uninstall Adminer from Debian 11

If you don’t want the Adminer Database system manager anymore on your Debian system; then you can remove it completely 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

Conclusion

Adminer is a valuable alternative to tools like phpMyAdmin. Adminer supports several database systems, including MySQL, MariaDB, PostgreSQL, SQLite, and more. At this point, you have learned to Set up Adminer on Debian 11.

Hope you enjoy it. You may also like these articles:

  • How To Set up OpenNMS on Debian 11
  • How To Install Wireshark on Debian 11
  • AnyDesk Remote Desktop Debian 11
  • Erlang Language Setup Debian 11
  • Latest Git Version Setup Debian 11
  • Reset Forgotten Root Password Debian 11

FAQs

What databases does Adminer support?

Adminer supports MySQL/MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Elasticsearch, and MongoDB (with plugins).

How do I back up a database with Adminer?

Log in to Adminer, select the database you want to back up, click Export from the menu, choose the export format (e.g., SQL, CSV), and download the file.

Alternative Solutions for Managing Databases on Debian 11

While Adminer provides a lightweight and versatile database management solution, alternative approaches exist, each with its own advantages and disadvantages. Here are two such alternatives:

1. Using phpMyAdmin

phpMyAdmin is arguably the most popular web-based MySQL database administration tool. While Adminer boasts a smaller footprint and wider database support, phpMyAdmin offers a more feature-rich interface and a larger community for support and plugins. To install and configure phpMyAdmin on Debian 11, follow these steps:

  • Installation:

    sudo apt update
    sudo apt install phpmyadmin php-mbstring php-zip php-gd php-xml  php-pear php-gettext
    sudo phpenmod mbstring
    sudo systemctl restart apache2

    During the installation, you’ll be prompted to select the web server to configure phpMyAdmin for. Choose apache2 and select <Yes> when asked to configure the database for phpMyAdmin with dbconfig-common. Enter your MariaDB root password when prompted.

  • Accessing phpMyAdmin:

    After installation, access phpMyAdmin by navigating to http://<server-ip-address>/phpmyadmin in your web browser. Log in using your MariaDB credentials.

  • Security Considerations:

    For enhanced security, consider changing the default phpMyAdmin URL and implementing additional authentication measures.

phpMyAdmin provides a comprehensive set of tools for managing MySQL and MariaDB databases, making it a robust alternative to Adminer. The rich feature set provides the tools to handle larger database systems where the features of Adminer might be lacking.

2. Using Dbeaver

Dbeaver is a free, open-source, universal database tool. Unlike Adminer and phpMyAdmin, which are web-based, Dbeaver is a desktop application. This offers a potentially more responsive and feature-rich experience, particularly for complex database management tasks. Dbeaver supports a wide range of databases, including MySQL, PostgreSQL, Oracle, SQL Server, SQLite, and many others, making it a versatile choice for developers and database administrators working with multiple database systems. To install and use Dbeaver on Debian 11, follow these steps:

  • Installation:

    Dbeaver isn’t available in the default Debian repositories. Download the DEB package from the Dbeaver website (https://dbeaver.io/download/). Once downloaded, install it using:

    sudo apt install ./dbeaver-<version>-amd64.deb

    Replace <version> with the actual version number of the downloaded package. You may need to install dependencies separately if the above command fails:

    sudo apt --fix-broken install
    sudo apt install ./dbeaver-<version>-amd64.deb
  • Running Dbeaver:

    After installation, you can launch Dbeaver from your desktop environment’s application menu.

  • Connecting to a Database:

    In Dbeaver, click the "New Database Connection" icon. Select the database type (e.g., MySQL, PostgreSQL) and enter the connection details, such as hostname, port, username, and password.

Dbeaver provides a powerful and flexible database management environment, making it an excellent alternative to web-based tools like Adminer and phpMyAdmin. It’s desktop based and supports a wider range of databases making it a good choice.

Leave a Reply

Your email address will not be published. Required fields are marked *