Getting PostgreSQL working with Kali 2.0 and Metasploit
Many people have had database connectivity (database connect) issues with Metasploit
using Kali 2.0. By the time you read this, the issue should be fixed
via a new Kali distribution. If it is not, use these steps to get your
SQL database properly connected to Metasploit.

We need to determine if your Metasploit database is working properly.


You can see from the screen shot that the database is not connected.
So let’s get out of Metasploit and go back to the terminal, then follow a few steps to get things working properly.
Step 1: Updates
The first thing we will do is go thru the standard update process from the terminal by typing:
apt-get update && apt-get upgrade

Step 2:
Wait until the update process completes. Once it has, type in the following in the terminal command line:
service postgresql restart

Step 3:
Next, type the following command:
msfdb init

Note: This step may take a few minutes.
Step 4:
Next, launch msfconsole…

Step 5:
Then type in db_status.

You will now see database connected.

We need to determine if your Metasploit database is working properly.
- First, we open Metasploit by typing msfconsole.

- Next we type db_status

You can see from the screen shot that the database is not connected.
So let’s get out of Metasploit and go back to the terminal, then follow a few steps to get things working properly.
Step 1: Updates
The first thing we will do is go thru the standard update process from the terminal by typing:
apt-get update && apt-get upgrade

Step 2:
Wait until the update process completes. Once it has, type in the following in the terminal command line:
service postgresql restart

Step 3:
Next, type the following command:
msfdb init

Note: This step may take a few minutes.
Step 4:
Next, launch msfconsole…

Step 5:
Then type in db_status.

You will now see database connected.
Post a Comment