kali中的MySQL数据库能直接使用吗

kali中的MySQL数据库能直接使用吗,第1张

正确的做法是:service postgresql start

service metasploit start

msfconsole

/etc/init.d/posrgresql start2

msfconsole)

db_connect postgres:postgres@localhost/msf3dev #根据自己是几强狂吧。

kali默认的也没有配置database.yml

先启动postgres数据库

root@firecat:~# service postgresql start

[ ok ] Starting PostgreSQL 9.1 database server: main.

root@firecat:~#

再启动metasploit

root@firecat:~# service metasploit star

t最后再启动msfconsole

默认的数据库与密码存放在这里:/opt/metasploit/apps/pro/ui/config/database.yml

如里没有数据库帐号密码, 可以su - postgres切换到postgres用户, 再用下面的命令创建用户与密码:

createuser -P -s -e username

createdb dbname

注意:有时db_statu显示你连接上了, 但查找时, 提示没连接数据库, 这时候可能你要等一会才行,

要不, 就db_rebuild_cache 之后, 等一会就行。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/9941575.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-03
下一篇 2023-05-03

发表评论

登录后才能评论

评论列表(0条)

保存