Adminer, an alternative way to access database! It’s a replacement of traditional phpMyAdmin.
Hey hey, wait, what you said? An alternative for phpMyAdmin? Yeah, Adminer, it’s a substitute of phpMyAdmin. Here I’m going to explain the installation and basic usages of Adminer. It is an open source database management tool written in PHP. The team Adminer says, it’s much faster and secure than the traditional way of phpMyAdmin usage. To see more details about Adminer, you can review their official web page https://www.adminer.org/
The team Adminer states that, you will get a tidier user interface, better support for MySQL features, higher performance and more security. It is very lightweight as well as very powerful.
Important features
- You can connect to a database server with username and its password.
- It’s simple to select an existing database or create a new one.
- You can simply list fields, indexes, foreign keys and triggers of table.
- Change name, engine, collation, auto_increment and comment of table.
- Alter name, type, collation, comment and default values of columns.
- It’s really simple to add and drop tables and columns.
- Create, alter, drop and search by indexes including fulltext.
- Create, alter, drop and link lists by foreign keys.
- Create, alter, drop and select from views.
- Create, alter, drop and call stored procedures and functions.
- Create, alter and drop triggers.
- List data in tables with search, aggregate, sort and limit results.
- Insert new records, update and delete the existing ones.
- Supports all data types, blobs through file transfer.
- Execute any SQL command from a text field or a file.
- Export table structure, data, views, routines, databases to SQL or CSV.
- Print database schema connected by foreign keys.
- Show processes and kill them.
- Display users and rights and change them.
- Display variables with links to documentation.
- Manage events and table partitions (MySQL 5.1).
- Schemas, sequences, user types (PostgreSQL).
Installation steps
Here, CryBit going to explain the installation steps and the basic usage of Adminer on a CentOS based server.
Step 1 : SSH to server as root user.
Step 2 : Create and change the directory to /usr/share/adminer
# mkdir /usr/share/adminer && cd /usr/share/adminer
Step 3 : Download the latest version of Adminer. You can check the available versions from this link >> Download Adminer <<
# wget https://www.adminer.org/static/download/4.2.5/adminer-4.2.5.php -O index.php
[[email protected] adminer]# wget https://www.adminer.org/static/download/4.2.5/adminer-4.2.5.php -O index.php
--2016-10-04 01:58:01-- https://www.adminer.org/static/download/4.2.5/adminer-4.2.5.php
Resolving www.adminer.org... 54.79.123.29
Connecting to www.adminer.org|54.79.123.29|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 423951 (414K) [application/octet-stream]
Saving to: `index.php'
100%[================================================>] 423,951 205K/s in 2.0s
2016-10-04 01:58:04 (205 KB/s) - `index.php' saved [423951/423951]
[[email protected] adminer]# ll
total 416
-rw-r--r-- 1 root root 423951 Jun 1 13:10 index.php
Step 4 : Configure Apache to use Adminer
Once the download is completed you need to configure Apache to use Adminer for the databases on your server. Here I’m going to explain those steps.
Create the following configuration file
vi /etc/httpd/conf.d/adminer.conf
Step 5 : Add the following entries in /etc/httpd/conf.d/adminer.conf
Alias /adminer "/usr/share/adminer"
<Directory "/usr/share/adminer">
AllowOverride All
Options FollowSymlinks
Order deny,allow
Deny from all
Allow from 101.10.100.12
Replace the IP address with your local end IP address. Or allow for all users.
Step 6 : Restart Apache
/etc/init.d/httpd restart
That’s it!! You’re ready to use Adminer now!
Step 7 : Accessing Adminer via web-browser
You can access it using any of the domain domain pointing to your server or directly using the hostname or IP address.
http://ip.address/adminer
You will see a login prompt like the image added below:
Cool… Go ahead and njoy!!
Nope, last step throw an error, adding the entries in /etc/httpd/conf.d/adminer.conf cause httpd fail to restart. Any suggestion?
Marco,
Please let me know the error details while restarting the Apache service.
Hi, thank you but nevermind, i placed it in /var/www/html/adminer and edited httpd.conf for ip access. It works perfectly 😀
i want to white list ip address in adminer.php file itself .is it possible .creating a config file is ok but it would be really helpful if it is specified in adminer.php file
Would this work in a CENTOS 7.4 server with Cpanel installed? CPanel people recommend creating plugin: forums.cpanel.net/threads/adminer-on-whm.615539/