Learn basics of Linux hacking for hacking aspirants Part 14

This tutorial is based on the mysql kali linux. MySQL is a very popular database application used in almost all web application. This will let you know about working the MySQL application.

Install MySQL Kali Linux

Before going into the deep, I am going to give a small introduction for mysql kali linux. MySQL is a GPU license application for the manipulation of database. Since MySQL was developed by sun microsystems & later was purchased by Oracle in 2008 & 2009 respectively.
Oracle & free source decided to let MySQL freeware for the users. Because of this reason the web technologies used the MySQL as its backend. The following technologies that use MySQL are

  • Kayak
  • Walmart.com
  • Wikipedia
  • YouTube
  • WordPress
  • Facebook
  • LinkedIn
  • Twitter

Most of all content management system like Joomla & Ruby on rails also uses MySQL as their database. So if you are going to learn MySQL, then it would be helpful in the hacking career.

Install mysql kali linux

Before installing MySQL, you need to update your repositories. The command to update the repositories is

apt-get update

This command will take some time according to your Internet Connection. After it is done go to the next step.
Also Read : Learn basics of Linux hacking for hacking aspirants Part 13
To install MySQL , type the command given

apt-get install mysql-server

During, the installation, there will a message flashed that will ask you for the root password. If you ignored the password section, then you can set the password by shell script.


A message will appear on the screen asking for password.

mysql kali linux
mysql kali linux

After this there will be many more messages on the screen which you need to enter.

Start MySQL

Type the command on the terminal.

mysql -u root -p

After the command, password needs to be entered.
In case you are far away from the database server, like being a hacker then you need to use this command.

mysql -u root -p

This command will take to the database after you enter the password.

Show Database

To hack a database, now we have to use the command to display the database.

show databases;

As the command will show the details of database, now you can
Use a field name of database like this

use <database field name>;

This command will show you a message “”Database changed”.

Find a Table

To display a table use show command in the following syntax.

show tables;

Select Data

To see a specific data from the table you can use select command.

SELECT <columns> FROM <table>

Also Read : Learn basics of Linux hacking for hacking aspirants Part 12
Now these are the important MySQL commands that are used in the MySQL database management. If you have any questions regarding it, ask in the comment box. Thank You.

Leave a Comment