likes
comments
collection
share

MongoDB数据库数据突然消失 数据丢失

作者站长头像
站长
· 阅读数 17

查找原因

感觉是被黑了看了一眼数据库给我整笑了 MongoDB数据库数据突然消失 数据丢失内容是

All your data is a backed up. You must pay 0.05 BTC to 1Kz6v4B5CawcnL8jrUvHsvzQv5Yq4fbsSv 48 hours for recover it. After 48 hours expiration we will leaked and exposed all your data. In case of refusal to pay, we will contact the General Data Protection Regulation, GDPR and notify them that you store user data in an open form and is not safe. Under the rules of the law, you face a heavy fine or arrest and your base dump will be dropped from our server! You can buy bitcoin here, does not take much time to buy https://localbitcoins.com or https://buy.moonpay.io/ After paying write to me in the mail with your DB IP: rambler+14ebs@onionmail.org and/or mariadb@mailnesia.com and you will receive a link to download your database dump.

翻译成人话就是转我0.05BTC(约16103人民币)就给你恢复,48小时不给我转,我就黑你服务器

我肯定是不能转的,里面都是测试数据,没有密码

解决方法

要设置个密码,然后端口号不能用27017,太容易被扫到了设置密码

use admin

db.createUser({user:"yonghuming",pwd:"mima",roles:["root"]})

密码尽量复杂一点,然后查看密码

show users

找到 MongoDB 安装目录,打开 mongod.cfg文件,找到以下这句:

#security:

修改为:

security:
  authorization: enabled

增加权限验证就好了