Do you get the following error message when you type in db_driver on Metasploit console on BlackTrack5?
[*] No Active Driver
[*] Available:
[*] 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
msf >
And you have tried installing mysql driver but didn't solve the problem ?
This happens because when you start msfconsole by /pentest/exploits/framework3/msfconsole, it does not set the environment variables properly
So all you have to do is, start msfconsole using BT5 menu or by using /usr/local/bin/msfconsole
[*] No Active Driver
[*] Available:
[*] 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
msf >
And you have tried installing mysql driver but didn't solve the problem ?
This happens because when you start msfconsole by /pentest/exploits/framework3/msfconsole, it does not set the environment variables properly
So all you have to do is, start msfconsole using BT5 menu or by using /usr/local/bin/msfconsole
You're a lifesaver, thanks!
ReplyDeleteafter gem, updates, diving into .rb files, this simple tip saved me.
ReplyDeletehow could you find this?
congrats for you!
Thanks for the tip! I was starting to get a bit frustrated about this particular issue..
ReplyDeleteI don't use backtrack. Which env variables do I need?
ReplyDeleteThanks from the bottom of my heart.......after so many errors this tip worked like charm
ReplyDeletewhy mysql won't show
ReplyDeletemsf > db_driver
[-] The db_driver command is DEPRECATED
Because Metasploit no longer supports databases other than the default
PostgreSQL, there is no longer a need to set the driver. Thus db_driver
is not useful and its functionality has been removed. Usually Metasploit
will already have connected to the database; check db_status to see.
[*] postgresql connected to msf3dev
msf >
You're rock. Thanks you so much
ReplyDelete