try going to
vim /opt/metasploit/properties.ini

view the name of the database
db_connect <userindb>:<passwordindb>@localhost:5432<nameofdbinproperties>