How to install Adminer on CentOS

How to install Adminer on CentOS

Adminer is a database management tool written in PHP similar to phpmyadmin which can support databases like MySQL, PostgreSQL, MS SQL and Oracle. This tutorial covers the installation process of Adminer on CentOS.

Installation procedure

Adminer needs LAMP server to run, so before installing Adminer first setup LAMP environment on the target server and then follow the below installation process. Download the package for adminer using the wget command.

[root@linuxhelp ~]# wget https://github.com/vrana/adminer/releases/download/v4.3.1/adminer-4.3.1.zip
--2017-04-18 15:24:09--  https://github.com/vrana/adminer/releases/download/v4.3.1/adminer-4.3.1.zip
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/627735/aabca140-20f8-11e7-9459-8e927e40ec0f.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256& X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170418%2Fus-east-
.
.
.
HTTP request sent, awaiting response... 200 OK
Length: 664410 (649K) [application/octet-stream]
Saving to: ‘ adminer-4.3.1.zip’ 
100%[===========================================================================================================================================> ] 664,410     37.6KB/s   in 24s   
2017-04-18 15:24:35 (27.3 KB/s) - ‘ adminer-4.3.1.zip’  saved [664410/664410]

Next extract the package directly into document root of apache webserver by executing the following command.

[root@linuxhelp ~]# unzip adminer-4.3.1.zip -d /var/www/html/
Archive:  adminer-4.3.1.zip
7af1ee3702420620641d075ebfd54d4b1d220409
   creating: /var/www/html/adminer-4.3.1/
  inflating: /var/www/html/adminer-4.3.1/.travis.yml 
   creating: /var/www/html/adminer-4.3.1/adminer/
  inflating: /var/www/html/adminer-4.3.1/adminer/call.inc.php 
  inflating: /var/www/html/adminer-4.3.1/adminer/create.inc.php 
  inflating: /var/www/html/adminer-4.3.1/adminer/database.inc.php 
  inflating: /var/www/html/adminer-4.3.1/adminer/db.inc.php 
  inflating: /var/www/html/adminer-4.3.1/adminer/download.inc.php
.
.
.
4.3.1/externals/jush/modules/jush-php.js 
  inflating: /var/www/html/adminer-4.3.1/externals/jush/modules/jush-simpledb.js 
  inflating: /var/www/html/adminer-4.3.1/externals/jush/modules/jush-sqlite.js 
  inflating: /var/www/html/adminer-4.3.1/externals/jush/modules/jush-sql.js 
  inflating: /var/www/html/adminer-4.3.1/externals/jush/modules/jush-textarea.js 
  inflating: /var/www/html/adminer-4.3.1/externals/jush/modules/jush-txt.js

Now rename the extracted directory by running the following command.

[root@linuxhelp ~]# mv /var/www/html/adminer-4.3.1/ /var/www/html/adminer

After extracting and renaming the directory, set the proper ownership and permission for the respective directory of adminer.

[root@linuxhelp ~]# chown -R apache:apache /var/www/html/adminer/
[root@linuxhelp ~]# chmod -R 775 /var/www/html/adminer/

Now login to MySQL database to create database and database user for adminer.

[root@linuxhelp ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with   or g.
Your MariaDB connection id is 10
Server version: 5.5.52-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.
MariaDB [(none)]>  create database adminer 
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>  CREATE USER ' adminer' @' localhost'  IDENTIFIED BY ' 123'  
Query OK, 0 rows affected (0.04 sec)

MariaDB [(none)]>  GRANT ALL ON adminer.* TO ' adminer' @' localhost'  
Query OK, 0 rows affected (0.02 sec)

MariaDB [(none)]>  flush privileges 
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]>  exit
Bye

Open the browser and navigate to following URL http://192.168.7.160/adminer/adminer and press enter. The adminer login page will appear.

The newly created database appears in the Adminer. Now the user can view and work with the database and their associated tables.

Wasn' t that an easy installation procedure? Adminer includes features like SQL syntax highlighting, user friendly interface and editing of other database objects.

Tag : CentOS Adminer
FAQ
Q
How to login in to mysql for adminer?
A
You can login to MySQL database using the following command

#mysql -u root -p
Q
What are the alternatives to phpmyadmin like adminer?
A
The alternatives to phpmyadmin like adminer yes, SQL Buddy https://www.linuxhelp.com/how-to-install-sql-buddy-on-ubuntu-16-04/
Q
What is Adminer?
A
Adminer is a replacement of phpmyadmin, it is used for managing the Database through GUI
Q
What type of databases that adminer could manage?
A
adminer could manage
MySQL,
PostgreSQL,
SQLite and Oracle databases
Q
Whaere i can find the official website of this tool?
A
you can check the official website from here : 'https://www.adminer.org/en/"