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
Printable View
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
You need to post what you did and what error messages you received.
there was some nice howto from sickness....
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
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
sorry for this late info...
I 'm running that command with backtrack 4 r1 using vmware player
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