Results 1 to 8 of 8

Thread: msf console cant connect to db

  1. #1
    Just burned his ISO
    Join Date
    Jun 2011
    Posts
    3

    Default msf console cant connect to db

    hey all i cant seem to connect to a db or create one i get the following:
    msf > db_connect root@metasploit3
    [-] Error while running command db_connect: Failed to connect to the database: uninitialized constant MysqlCompat::MysqlRes

    Call stack:
    /opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1841:in `db_connect_mysql'
    /opt/framework3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1724:in `cmd_db_connect'
    /opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:376:in `run_command'
    /opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:338:in `block in run_single'
    /opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:332:in `each'
    /opt/framework3/msf3/lib/rex/ui/text/dispatcher_shell.rb:332:in `run_single'
    /opt/framework3/msf3/lib/rex/ui/text/shell.rb:143:in `run'
    /opt/framework3/msf3/msfconsole:130:in `<main>'


    Is there anyone who can help?

  2. #2
    Junior Member M00kaw's Avatar
    Join Date
    Oct 2010
    Location
    127.0.0.1
    Posts
    47

    Default Re: msf console cant connect to db

    Uhm .. I tried with MySQl, but my laptop didn't like it and yada yada yada, so i made a work-around with postgresql :-)

    You can find my solution here: http://teh-geek.com/?p=136

  3. #3
    Just burned his ISO
    Join Date
    Jun 2011
    Posts
    3

    Default Re: msf console cant connect to db

    Many thanks i will give it a go.

  4. #4
    Senior Member
    Join Date
    Jan 2011
    Location
    over the under
    Posts
    197

    Default Re: msf console cant connect to db

    pretty similar but you could try this too ---> http://www.backtrack-linux.org/forum...ostgresql.html

  5. #5
    Good friend of the forums scottm99's Avatar
    Join Date
    Feb 2010
    Location
    underwater
    Posts
    371

    Default Re: msf console cant connect to db

    Try running db_connect –y /opt/framework3/config/database.yml at an msf> prompt. This will connect you to the built-in postgresql instance that's mentioned in 2901119's link above. In order for the db_connect command above to work, you'll need to start msfconsole from the gui menu option.
    If I could figure out how to scuba dive & hack at the same time, there would be nothing I couldn't do...

  6. #6
    Good friend of the forums zimmaro's Avatar
    Join Date
    Mar 2010
    Location
    milano
    Posts
    407

    Default Re: msf console cant connect to db


  7. #7
    Just burned his ISO
    Join Date
    Jun 2011
    Posts
    2

    Default Re: msf console cant connect to db

    Ensure that the mysql client is running?? -

    /$ cd /etc/init.d

    /$ ./mysql start


    Might be worth trying.

    Then the connect string should be something like db_connect root:toor@<ipaddress>/<optionalinstancename>

    if the DB is not found, it should create one.

    Adam

  8. #8
    Just burned his ISO
    Join Date
    May 2011
    Posts
    14

    Default Re: msf console cant connect to db

    i tried with http://teh-geek.com/?p=136 but now successful! I much love bt5! WHAT TO DO?

Similar Threads

  1. How to open a new console?
    By kensher in forum Beginners Forum
    Replies: 4
    Last Post: 04-30-2010, 09:58 AM
  2. remote console
    By vhawkeyev in forum Beginners Forum
    Replies: 0
    Last Post: 04-09-2010, 12:46 PM
  3. Msf console
    By ripon in forum OLD Pentesting
    Replies: 12
    Last Post: 01-02-2010, 10:08 AM
  4. How does BT do the console background?
    By .fr3. in forum OLD Newbie Area
    Replies: 1
    Last Post: 10-19-2008, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •