[framework] problem creating database in mysql

Mr Gabriel angelisonline at gmail.com
Sun Sep 16 13:04:31 CDT 2007


If you are running the framework as root, the you will access your  
database as root.
If your not running it as root, then you will access the database as  
the user you are running as.

Anyone feel free to correct me if i'm wrong, i think i use to have  
the same problem


On 16 Sep 2007, at 15:53, Jamuse wrote:

> I'm running:
> msf > version
> Framework: 3.1-dev.4575
> Console  : 3.1-dev.5070
>
> I can load the db_mysql module but when I try to connect I get the  
> following error:
> ====================================================================== 
> ===========
> msf > load db_mysql
> [*] Successfully loaded plugin: db_mysql
> msf > db_connect root at localhost
> [-] Error while running command db_connect: undefined method  
> `strip' for nil:NilClass
>
> /usr/local/src/trunk/plugins/db_mysql.rb:68: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
> ====================================================================== 
> ============
>
> When I try to create a database I get the following error message,  
> though the 'metasploit3' database is created
>
> ====================================================================== 
> ============
> msf > db_create
> [*] 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
> ====================================================================== 
> ============
>
> After creating the database I don't see the added commands like  
> db_nmap for example:
>
> ====================================================================== 
> ============
> msf > help
>
> MySQL Database Commands
> =======================
>
>     Command        Description
>     -------        -----------
>     db_connect     Connect to an existing database  
> ( user:pass at host:port/db )
>     db_create      Create a brand new database  
> ( user:pass at host:port/db )
>     db_destroy     Drop an existing database ( user:pass at host:port/ 
> db )
>     db_disconnect  Disconnect from the current database instance
>
> ====================================================================== 
> ============
>
> Any ideas what's wrong?
>




More information about the framework mailing list