当前位置:网站首页>【Mongodb】READ_ME_TO_RECOVER_YOUR_DATA,数据库被恶意删除
【Mongodb】READ_ME_TO_RECOVER_YOUR_DATA,数据库被恶意删除
2022-06-24 19:38:00 【顾鸟】
1. 介绍
自己个人的一台百度云云服务器上安装了MongoDB,用的默认配置(端口是默认端口,也没设置密码),后来就把这事抛到脑后了,也因为经常用无线网卡上网,ip经常是动态的,云服务器的安全组就放开了所有的ip。完全就是一台裸奔在云上的数据库 ,几天后发现MongoDB客户端连接失效,重连了一下MongoDB,建的库不见了,留下了一个新库:READ_ME_TO_RECOVER_YOUR_DATA,里面只有一张表:README,大致内容是说被攻击了,需要支付比特币才能恢复。

2. 解决方法
我使用的是配置用户名和密码的方式来现在访问服务器上的mongodb数据库,还有其他方法。我是通过宝塔面板工具来访问终端的,也可以使用其他shell工具。
连接 mongodb

为数据库库添加用户和读写权限
use hcs-server db.createUser({ user: "guniao", pwd: "123456", roles: [{ role: "readWrite", db: "hcs-server" }] })验证,输出1表示验证成功
db.auth("guniao","123456")修改mongodb配置文件中的authorization 为 enabled,并重启

使用Mongodb Compass 可视化工具再次验证用户和密码,并重新导入数据


修改后台连接mongodb的URL地址

参考连接:
https://blog.csdn.net/qq_34241004/article/details/120704586
https://www.freesion.com/article/3431841152/
边栏推荐
- Description of software version selection of kt6368a Bluetooth dual-mode transparent chip
- Nuscenes -- remedies for missing image files or 0-size images encountered during dataset configuration
- 04A中断的配置
- Idea global search replace shortcut key
- Yyds dry goods inventory junit5 learning II: assumptions class
- [Software Engineering] key points at the end of the period
- Docker installs MySQL 8.0. Detailed steps
- Virtual private network foundation
- New features of go1.18: efficient replication, new clone API for strings and bytes standard library
- Huada 04A operating mode / low power consumption mode
猜你喜欢

Principles of Ethernet port mirroring, link aggregation and VLAN Technology

Tetris

Common voting governance in Dao

Programmers become gods by digging holes in one year, carrying flags in five years and becoming gods in ten years

Row and column differences in matrix construction of DX HLSL and GL glsl

Redis hop table
CA Zhouji - the first lesson in 2022 rust

In the era of full programming, should I give up this road?

Heartless sword Chinese English bilingual poem 003 The sea of books

Docker installs redis-5.0.12. Detailed steps
随机推荐
Learn more about the practical application of sentinel
为什么有的程序员能力一般却能拿到好offer?
[personal experiment report]
In the first year of L2, arbitrum nitro was upgraded to bring more compatible and efficient development experience
Cache control of HTTP
Uncover the secret of station B. is it true that programmers wear women's clothes and knock code more efficiently?
产业互联网时代,并不存在传统意义上的互联网
Fanuc robot_ Introduction to Karel programming (1)
一个女孩子居然做了十年硬件。。。
Technology inventory: Technology Evolution and Future Trend Outlook of cloud native Middleware
Chapter 10 project communication management
Chapter 10 project stakeholder management
Docker installs MySQL 8.0. Detailed steps
Idea close global search box
Short video mall system, how does scroll view adapt to the remaining height of the page
堆內存分配的並發問題
Row and column differences in matrix construction of DX HLSL and GL glsl
Redis hop table
Leetcode: calculate the number of elements less than the current element on the right (sortedlist+bisect\u left)
Huada 4a0gpio settings