A web-based database management system offers several advantages for any business operating databases. It allows databases to be administered from anywhere in the world, which increases productivity and efficiency of database administration. Also, having a web-based management interface means you don't need to install a separate database client, but use a cross-platform web browser. Security may be simplified with web-based access, as security is now delegated to a web server.
There are several web-based database management tools available on Linux. Among them is Adminer which is a PHP application. Adminer can fully support the administration of various databases including MySQL, MariaDB, MongoDB, PostgreSQL, SQLite, and Oracle. Its feature set is more complete than other alternatives such as phpMyAdmin.
In this tutorial, I describe how to set up a web-based management system with Adminer, and how to manage databases in web interface. Here I use MySQL as a backend database.
Main Features of Adminer
Let me first highlight Adminer's full features.
- Basic database management functions (add/remove/edit database/table schema/data).
- Editing of database objects (e.g., views, triggers, events, procedures, user permissions, etc.).
- Execution of user-typed SQL commands.
- Import and export of databases and tables.
- Multi-language support.
- Extensible functionality via plugins.
Install Adminer on Linux
Assuming that you already have a MySQL server up and running with remote access enabled, you can install Adminer as follows.
To install Adminer on Debian, Ubuntu or Linux Mint, use the commands below. This will install Adminer as well as Apache2 web server (which Adminer depends on).
$ sudo service apache2 restart
To install Adminer on CentOS, Fedora or RHEL, set up Apache first, and download and provision Adminer from the official website as follows.
$ git clone https://github.com/vrana/adminer.git
$ sudo cp -r adminer/* /var/www/html
$ sudo service httpd start
Web-based Database Management of Adminer
Once Apache web server with Adminer is up and running, go to "http://<ip-address-of-mysql-server>/adminer" on your web browser.
You will see the Adminer's web interface, where you can log in to a remote database server. Enter "localhost" for "Server" field. The "Database" field is optional. If you leave this field empty, you can view all available databases after logging in.
Once logged in, you can perform common database management operations via web interface.
Create a new database.
Add a new table to a database.
Export a database to a file.
Run a SQL command.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.