Hi everyone
Today in this video I m gonna show you show you that how you can fix metasploit error [-]Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host “” and accepting
TCP/IP connections on port 5432?
This problem occurs when postgresql is not connected with metasploit_database or msf_database .
To fix this issue watch my video till the end
and also follow the commands

Commands for fixing error
open termux first and use the following command
1.mkdir -p $PREFIX/var/lib/postgresql
2.initdb $PREFIX/var/lib/postgresql
3.pg_ctl -D $PREFIX/var/lib/postgresql start
after that change your directory to metasploit-framework
4.cd metasploit-framework

watch my previous video
How to Install Metasploit-Framework-4.16.12 on Termux

watch my old termux series videos
how to install Metasploit-Framework-4.14.28
on Termux

how to install metasploit framework in Termux Without root

Harvest email addresses with msfconsole

MY blogspot https://tech-x3.blogspot.in

Background music’s by
Elektronomia – Limitless [NCS Release]

Thanks for watching tech
please like, share and subscribe my channel Tech-X