Metasploit mailing list archives
problem creating database in mysql
From: wilson-ml at bubba.org (Brian Wilson)
Date: Sat, 15 Dec 2007 22:53:19 -0500
On 9/16/07, H D Moore <hdm[at]metasploit.com> wrote: The creation uses command line tools, which ones? the connect uses ActiveRecord. Ddi you try it after you specified the database name (after the /)? Yes. As I mentioned removing the database works fine: msf > db_destroy root[at]localhost/metasploit3 Database "metasploit3" dropped and when I create the database, the database gets created but I get the following error message: ======================================================================= msf > db_create root[at]localhost/metasploit [*] Database creation complete (check for errors) [-] Error while running command db_create: This plugin failed to load: Failed to connect to the database Call stack: /usr/local/src/trunk/plugins/db_mysql.rb:139:in `cmd_db_create' ./lib/rex/ui/text/dispatcher_shell.rb:230:in `send' ./lib/rex/ui/text/dispatcher_shell.rb:230:in `run_command' ./lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single' ./lib/rex/ui/text/dispatcher_shell.rb:191:in `each' ./lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single' ./lib/rex/ui/text/shell.rb:125:in `run' ./msfconsole:77 ======================================================================= Likewise just connecting to the database returns the following error: ====================================================================== msf > db_connect root[at]localhost/metasploit [-] Error while running command db_connect: This plugin failed to load: Failed to connect to the database Call stack: /usr/local/src/trunk/plugins/db_mysql.rb:73:in `cmd_db_connect' ./lib/rex/ui/text/dispatcher_shell.rb:230:in `send' ./lib/rex/ui/text/dispatcher_shell.rb:230:in `run_command' ./lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single' ./lib/rex/ui/text/dispatcher_shell.rb:191:in `each' ./lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single' ./lib/rex/ui/text/shell.rb:125:in `run' ./msfconsole:77 ====================================================================== Thanks for your help. FYI, I had the same issue using the version of gems from Ubuntu Gusty (0.9.4). Once I upgraded to gems 0.9.5 from rubyforge, everything worked as it should. After you install gems, then install version 1.2.4 of rails: # gem install -v=1.2.4 rails msf > load db_mysql [*] Successfully loaded plugin: db_mysql msf > db_connect root:<pass>@localhost/metasploitdb msf > Hope that helps, Brian
Current thread:
- problem creating database in mysql Brian Wilson (Dec 15)