New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use mysql database? #19145
Comments
There's no official support for MySQL as the database out of the box with Metasploit; you might be able to change the configuration file here and have it work: https://github.com/rapid7/metasploit-framework/blob/master/config/database.yml.example - which should be here To run "remotely", the
You might have to configure firewalls etc; you'll also need to run the database setup yourself. You might have to follow these steps too: |
You can also run postgres remotely, via TCP - in the same vein as above |
I did set the host value in database.yaml. And it does connect to the remote host, but still every time i start msfconsole or msfvenom it tries to initialize a local database in ~/.msf4/db. It's quite annoying. |
Pull requests are welcome 👍 |
Summary
I run a lot of services, but only MSF requires a postgresql database. I would like to get rid of it to save on the memory, storage and cpu overhead and use the existing mysql database.
How do i switch from using a postgresql database to mysql? I wish to use an existing, remote database and not create a local one.
Relevant information
Suppose I have my database on server.lan (192.168.1.5), running on the default mysql port of tcp 3306. the username on that mysql server is is 'msf', the password is 'p4ssw0rd', the database is 'metasploitdb'.
I can not find information on these subjects:
Whenever I look up anything remotely resembling this information I either get how to use the postgresql database (but not a remote one, only a local one) or how to attack or enumerate a remote mysql server, not how to use it as a datastore for msf.
If this is not possible, is there some alternative? Maybe some sort of compatibility layer that pretends to be a postgresql server but instead translates the queries to mysql and forwards them to a mysql server instead? I tried looking for something like that but came up only with database migration tools. The best I could find was the mysql_fdw plugin for postgresql, but if possible I'd like to eliminate postgres entirely.
The text was updated successfully, but these errors were encountered: