handbook, books, note, tutorial, troubleshooting

Solved: [!] postgresql selected, no connection error [!]

[!] postgresql selected, no connection error [!]




Simply just follow this steps

tl@TestLab:~$ sudo msfconsole -q
msf > msfdb start
[*] exec: msfdb start

msf > db_status

[*] postgresql selected, no connection

msf > msfdb init

[*] exec: msfdb init
Creating database user ‘msf’

Enter password for new role:

Enter it again:

Creating databases ‘msf’ and ‘msf_test’

Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema

msf > db_status

[*] postgresql selected, no connection

msf > db_connect -y /usr/share/metasploit-framework/config/database.yml
[*] Rebuilding the module cache in the background…

msf > db_status

[*] postgresql connected to msf


That's it




Solved: [!] postgresql selected, no connection error [!]