[Fixed] Failed to Connect to the Database Metasploit
#1
Sblum nya mohon maaf klo repsol Big Grin
maklum ilmu ku blom tinggi \m/

oke,langsung aja
Mungkin dari beberapa orang yg baru belajar Metasploit, pernah ngalamain error database metasploit seperti ini

[Image: 1.png]
Failed to connect to the database: could not connect to server: connection refused


Udah Jelas banget dari Pesan nya, Database nya gak connected Smile
[hide]
Ok, Bgini cara Fix nya
1. Pastikan service postgresql, kalian berjalan
2. cek file config database metasploit nya ( /opt/metasploit-4.4.0/config/database.yml )


Jalankan Service Postgresql nya.
$ service postgresql start

Masih ada error ??
bisa jadi itu karna masalah config dengan dengan database msf kalian,
dan ini cara untuk setup new database msf dengan postgresql
Quote:root@Ganteng:# su - postgres

postgres@localhost~$ createuser [Nama User] -P
postgres@localhost~$ [Enter password]
postgres@localhost~$ Validate password
postgres@localhost~$ Shall the new role be a superuser? n
postgres@localhost~$ Shall the new role be allowed to create databases? n
postgres@localhost~$ Shall the new role be allowed to create new roles? n
postgres@localhost~$ createdb --owner=[Nama User] [Name_Database]
postgres@localhost~$ exit

setelah membuat user di posgresql

next kita membuat file configure database Metasploiut nya.
kalian bisa liat contoh file nya di
"/usr/share/metasploit-framework/config/database.yml.example"

edit aja langsung itu file example nya..

[Image: 1.png]

kemudian save
copy dan rename file tersebut Big Grin

$ sudo cp database.yml.example database.yml


Ok, Next.. Buka msfconsole

Jika masih belum connected.. coba di connect'kan langsung di metasploit console nya
msf > db_connect NamaUserTongue[email protected]:5432/name_database


Ok,Done.. :-bd
[/hide]

Postingan ini boleh di share/di perbanyak,dengan menyertai link sumber dibawah :
http://carbelius.blogspot.com/2014/06/fi...abase.html

ok,thank all :-bd
Klik Here

Clound@IBTeam:~#
EMail Me : [email protected]






Users browsing this thread: 1 Guest(s)