Results 1 to 8 of 8

Thread: can't change db_driver

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Jan 2011
    Posts
    11

    Default can't change db_driver

    hi..



    I don't know why I can change my db_driver to postgresql and mysql....
    I already see in metasploit-unleashed how to configuring database...
    but its' still doesn't work


    hope anyone can help me....


    than'ks for any help

  2. #2
    Senior Member
    Join Date
    Jan 2010
    Posts
    140

    Default Re: can't change db_driver

    You need to post what you did and what error messages you received.

  3. #3
    Member
    Join Date
    May 2010
    Location
    Frankfurt/Main
    Posts
    58

    Default Re: can't change db_driver

    there was some nice howto from sickness....

  4. #4
    Just burned his ISO
    Join Date
    Jan 2011
    Posts
    11

    Default Re: can't change db_driver

    I already see sickness how to...
    but it doesn't work too..



    msf > db_driver[*] Active Driver: sqlite3[*] Available: sqlite3
    [*] DB Support: Enable the mysql driver with the following command:[*] $ gem install mysql[*] This gem requires mysqlclient headers, which can be installed on Ubuntu with:[*] $ sudo apt-get install libmysqlclient-dev
    [*] DB Support: Enable the postgresql driver with the following command:[*] * This requires libpq-dev and a build environment[*] $ gem install postgres[*] $ gem install pg # is an alternative that may work


    then I following that command to enabling mysql and postgresql but it doesn't work too

    this is the eror message
    msf > gem install mysql[*] exec: gem install mysql

    Building native extensions. This could take a while...
    ERROR: Error installing mysql:
    ERROR: Failed to build gem native extension.

    /opt/metasploit3/bin/ruby extconf.rb
    mkmf.rb can't find header files for ruby at /opt/metasploit3/lib/ruby/include/ruby.h


    Gem files will remain installed in /opt/metasploit3/lib/ruby/gems/1.9.1/gems/mysql-2.8.1 for inspection.
    Results logged to /opt/metasploit3/lib/ruby/gems/1.9.1/gems/mysql-2.8.1/ext/mysql_api/gem_make.out

    then I try installing as root :
    gem install mysql
    Building native extensions. This could take a while...
    Successfully installed mysql-2.8.1
    1 gem installed
    Installing ri documentation for mysql-2.8.1...

    No definition for next_result

    No definition for field_name

    No definition for field_table

    No definition for field_def

    No definition for field_type

    No definition for field_length

    No definition for field_max_length

    No definition for field_flags

    No definition for field_decimals

    No definition for time_inspect

    No definition for time_to_s

    No definition for time_get_year

    No definition for time_get_month

    No definition for time_get_day

    No definition for time_get_hour

    No definition for time_get_minute

    No definition for time_get_second

    No definition for time_get_neg

    No definition for time_get_second_part

    No definition for time_set_year

    No definition for time_set_month

    No definition for time_set_day

    No definition for time_set_hour

    No definition for time_set_minute

    No definition for time_set_second

    No definition for time_set_neg

    No definition for time_set_second_part

    No definition for time_equal

    No definition for error_errno

    No definition for error_sqlstate
    Installing RDoc documentation for mysql-2.8.1...

    No definition for next_result

    No definition for field_name

    No definition for field_table

    No definition for field_def

    No definition for field_type

    No definition for field_length

    No definition for field_max_length

    No definition for field_flags

    No definition for field_decimals

    No definition for time_inspect

    No definition for time_to_s

    No definition for time_get_year

    No definition for time_get_month

    No definition for time_get_day

    No definition for time_get_hour

    No definition for time_get_minute

    No definition for time_get_second

    No definition for time_get_neg

    No definition for time_get_second_part

    No definition for time_set_year

    No definition for time_set_month

    No definition for time_set_day

    No definition for time_set_hour

    No definition for time_set_minute

    No definition for time_set_second

    No definition for time_set_neg

    No definition for time_set_second_part

    No definition for time_equal

    No definition for error_errno

    No definition for error_sqlstate

    then I type :/etc/init.d/mysql start
    mysql is't active too....


    is there something wrong with my command or did I miss something?
    hope someone can help me.....


    thank's for any help

  5. #5
    Junior Member laptopz's Avatar
    Join Date
    Dec 2010
    Posts
    55

    Default Re: can't change db_driver

    I remember having nasty issues until i got it working. As far as i remember gems are built against certain versions of mysql. I`m not 100% sure but i think 2.8.1 is built against mysql-5.0.67 and while it may work with previous versions, it`ll definitely spit a bunch of errors with 5.1 (something like "[-] Error while running command db_connect: Failed to connect to the database: uninitialized constant MysqlCompat::MysqlRes"). Since your installation is in /opt i will assume you`re on Ubuntu 10 or similar which probably ships with mysql-5.1, so solution should be to:
    Code:
    gem install ruby-mysql #which will install 2.9.3 instead of 2.8.1
    If anything can go wrong, it will....

  6. #6
    Just burned his ISO
    Join Date
    Jan 2011
    Posts
    11

    Default Re: can't change db_driver

    sorry for this late info...
    I 'm running that command with backtrack 4 r1 using vmware player

  7. #7
    Junior Member laptopz's Avatar
    Join Date
    Dec 2010
    Posts
    55

    Default Re: can't change db_driver

    I will strongly advise you to upgrade to r2. R1 is slightly outdated and support for it is currently dropped.
    If you decide to stick to your current setup you can try reverting to 2.7 with a command like:
    Code:
    sudo gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/bin/mysql_config
    If anything can go wrong, it will....

  8. #8
    Just burned his ISO
    Join Date
    Jan 2011
    Posts
    11

    Default Re: can't change db_driver

    Quote Originally Posted by laptopz View Post
    I will strongly advise you to upgrade to r2. R1 is slightly outdated and support for it is currently dropped.
    If you decide to stick to your current setup you can try reverting to 2.7 with a command like:
    Code:
    sudo gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/bin/mysql_config

    Ok ,I will update to r2

    than'ks

Similar Threads

  1. db_driver mysql problem
    By ktpmm5 in forum Beginners Forum
    Replies: 1
    Last Post: 06-03-2010, 07:00 AM
  2. how to change KDE ?
    By pirat in forum Beginners Forum
    Replies: 1
    Last Post: 05-01-2010, 07:54 PM
  3. metasploit , db_driver: command not found
    By Justs in forum Beginners Forum
    Replies: 2
    Last Post: 03-30-2010, 03:44 AM
  4. Problem loading db_sqlite3, calling db_driver
    By kazalku in forum OLD Latest Public Release - BackTrack4 Beta
    Replies: 11
    Last Post: 06-21-2009, 06:23 PM
  5. How to change boot up welcome screen to change info?
    By Gr33n3gg in forum OLD Newbie Area
    Replies: 2
    Last Post: 09-23-2008, 10:05 PM

Posting Permissions

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