How to install PhpMyAdmin on Ubuntu 17.04

How to install PhpMyAdmin on Ubuntu 17.04

PhpMyAdmin is database management tool. It is a PHP application that manages MySQL or MariaDB database via web browsers and manage the user' s database. The frequently used operations are managing databases, tables, columns, relations, indexes, users, permission, etc. This tutorial explains the installation procedure of PhpMyAdmin on Ubuntu 17.04.

Installation procedure

To start the installation procedure, update the required repositories by executing the following command.

root@linuxhelp1:~# apt-get update 
Hit:1 http://in.archive.ubuntu.com/ubuntu zesty InRelease                                                  
Hit:2 http://security.ubuntu.com/ubuntu zesty-security InRelease                                           
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Reading package lists... Done

The target system is updated with the required repositories. Install the LAMP server in the target system and press y to continue the installation process.

root@linuxhelp1:~# apt-get install apache2 mysql-server php -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2-bin apache2-data apache2-utils libaio1 libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libevent-core-2.0-5
  libhtml-template-perl liblua5.2-0 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 php-common php7.0 php7.0-cli php7.0-common
  php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear libipc-sharedcache-perl mailx tinyca
.
.
.
Setting up php7.0 (7.0.18-0ubuntu0.17.04.1) ...
Setting up php (1:7.0+49) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (232-21ubuntu2) ...
Processing triggers for ufw (0.35-4) ...

The PhpMyAdmin package has been installed successfully. Start and enable Apache and MySQL service by running the following commands.

root@linuxhelp1:~# systemctl start apache2
root@linuxhelp1:~# systemctl enable apache2
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2

root@linuxhelp1:~# systemctl start mysql
root@linuxhelp1:~# systemctl enable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable mysql?

The Apache and MySQL services are running without any glitches. Now install the PhpMyAdmin package and press y to continue with the installation procedure.

root@linuxhelp1:~# apt-get install phpmyadmin -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  dbconfig-common dbconfig-mysql javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore libmcrypt4 libzip4 php-bz2 php-curl php-gd php-mbstring php-mcrypt
  php-mysql php-pear php-php-gettext php-phpseclib php-tcpdf php-xml php-zip php7.0-bz2 php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-xml
  php7.0-zip
.
.
.
populating database via sql...  done.
dbconfig-common: flushing administrative password
apache2_invoke: Enable configuration phpmyadmin
Processing triggers for libapache2-mod-php7.0 (7.0.18-0ubuntu0.17.04.1) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...

Open the browser and enter the target system IP address http://192.168.7.232/phpmyadmin along with the PhpMyAdmin file to run the application. Now log in to PhpMyAdmin with the required database username and password.

The PhpMyAdmin is running successfully and now the user can manage the databases.

That was an easy installation procedure, wasn' t it? PhpMyAdmin can be used to quickly create or delete databases and even import and export the databases.

Comment
eoonk
Mar 09 2018
I did all this, no errors and still I can't open the Phpmyadmin page on my server. What else can I chack?
Add a comment
FAQ
Q
Where is phpMyAdmin?
A
CPANEL:1. Log into cpanel.2. Under Databases, you can find PHPMYADMIN option.PLESK:1.Login to your Plesk panel.2.Click Databases.3.Navigate through the database
Q
How to install the PhpMyAdmin package on Ubuntu/Fedora?
A
Run the following command:
# apt-get install phpmyadmin
Q
How can I gzip a dump or a CSV export? It does not seem to work?
A
This feature is based on the gzencode() PHP function to be more independent of the platform (Unix/Windows, Safe Mode or not, and so on).
Q
What is PhpMyAdmin?
A
PhpMyAdmin is a database management tool. It is a PHP application that manages MySQL or MariaDB database via web browsers and manages the user' s database. The frequently used operations are managing databases, tables, columns, relations, indexes, users, permission, etc.
Q
What are all the requiring repositories in phpMyAdmin?
A
The target system is updated with the required repositories. Install the LAMP server in the target system and press y to continue the installation process.
# apt-get install apache2 mysql-server php