You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

Hello guys!, we are going look at How to Install PHPMyAdmin in Kali Linux and Debian. It works same for Ubuntu, Debian distros, Linux Mint, Kubuntu and all Debian like operating systems.If you have a new installed Kali Linux system read our tutorial on Top Ten Must Do Things After Installing Kali Linux. If you have Ubuntu system check What to Do after Installing Ubuntu 14.04, 12.04, 13.0.

What is PHPMyAdmin?

PHPMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web interface. phpMyAdmin supports a wide range of operations on MySQL, MariaDB, and Drizzle. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.

Features of PHPMyAdmin are

  • An intuitive cool web interface
  • Support for most MySQL features
  • Import data from CSV and SQL
  • Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 – OpenDocument Text and Spreadsheet, Word, LATEX, and others
  • Administering multiple servers
  • Creating PDF graphics of your database layout
  • Creating complex queries using Query-by-example (QBE)
  • Searching globally in a database or a subset of it
  • Transforming stored data into any format using a set of predefined functions, like displaying BLOB-data as image or download-link

The following is the procedure to follow while installing PHPMyAdmin in Kali Linux.


Installation of  Apache web server and MySQL

$ sudo apt-get update
$ sudo apt-get install apache2
$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Activate MySQL with the command:

$ sudo mysql_install_db

Finish up by running the MySQL set up script:

$ sudo /usr/bin/mysql_secure_installation

Install Php:

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

The next thing to do is to reset the mysql password. Mysql in Kali Linux and Debian derivatives come with a password. We have to reset this password and set our own password. Use the following commands:

su - 
sudo /etc/init.d/mysql stop
mysqld_safe --skip-grant-tables

Open another Terminal in a new Window and type the following commands
NOTE: Remember to replace “new-password” with the password that you would like to use PHPMyAdmin an MySQL root login.
Then type:

su -
mysql -u root
use mysql;
update user set  password=PASSWORD("new-password") where User='root';
flush privileges;

The next thing is to restart MySQL; use the commands below:

/etc/init.d/mysql stop
/etc/init.d/mysql start

Test to see whether MySQL is now working with your new password and username root:

mysql -u root -p

Now we have to install PHPMyAdmin if you don’t need the latest version just type

sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin/  /var/www/phpmyadmin

You can install latest phpMyadmin by downloading it from the link below:

Extract the downloaded file and copy it to /usr/share folder. Then create a symbolic link by typing:

sudo ln -s /usr/share/phpfolder/ /var/www/phpmyadmin

Start PHPMyAdmin

sudo service apache2 start && service mysql start

Start your favorite browser and type:


 Login with root and password.

Search tags:
How to install MySQL in Kali Linux and Ubuntu
How to install PHPMyAdmin
How to Install PHPMyAdmin in Kali Linux and Debian
Get PHPMyAdmin running on Debian and Kali Linux
Windows Powershell Commands on demand

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF