美文网首页
针对kali的Metasploit连接不上数据库的报错

针对kali的Metasploit连接不上数据库的报错

作者: 黑小柴 | 来源:发表于2018-11-30 17:40 被阅读0次

    如有如下报错:

    Failed to connect to the database: FATAL: password authentication failed for user "msf"
    FATAL: password authentication failed for user "msf"
    

    或者

    Failed to connect to the database: could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5433?
    

    /usr/share/metasploit-framework/config目录中运行以下指令:

    root@kali:/usr/share/metasploit-framework/config# msfdb reinit
    root@kali:/usr/share/metasploit-framework/config# cp database.yml /root/.msf4/
    root@kali:/usr/share/metasploit-framework/config# service postgresql restart
    root@kali:/usr/share/metasploit-framework/config# msfconsole
    

    即可

    出现
    Module database cache not built yet, using slow search
    msfdb init
    msf > db_rebuild_cache
    即可

    相关文章

      网友评论

          本文标题:针对kali的Metasploit连接不上数据库的报错

          本文链接:https://www.haomeiwen.com/subject/hlahcqtx.html