mvnobrega's avatar

Database and Cryptocurrency Mining

Does anyone believe that databases like MySQL, MongoDB, MariaDB, among others, are camouflaging cryptocurrency mining while we use them?

Would this be possible to identify?

Well, until a few years ago, I never had any problems with Load Equalizer on my servers. They were always low, just like the server's own configuration. Nowadays, I struggle with this and it never works. And these are sites with little traffic, and suddenly it starts taking up a lot of CPU. I've changed servers twice and the same thing happens.

I've found this very strange. No matter how much I optimize, I notice that the databases are always consuming more CPU than they should.

But since I'm not an expert on the subject, I wanted to know your opinion on this.

Note: I have always used Hostgator, and I have noticed unusual CPU activity even when changing servers for this very reason. I get a server with zero CPU usage, put a simple website on it, and then every now and then it starts consuming almost all of the CPU, spikes, slows down out of nowhere, when we go to track the logs in detail, they seem to make sense due to the consumption, but at the same time they don't. It seems like everything is camouflaged, it could be a plumbing problem, but I'm a little suspicious.

0 likes
5 replies
jlrdw's avatar

Have you considered a security audit?

2 likes
mvnobrega's avatar

@jlrdw

Even if I sign up for a new VPS server with everything from scratch? With a simple website with 40 hits per day, is it occasionally consuming a lot of CPU?

But do you think this can happen without anyone noticing? Whether it's the server or the database itself using CPU inappropriately, whatever the purpose?

Because I don't notice a pattern, it's always very unstable, but there are some strange CPU consumption spikes, and when I enable general_log to see what's happening, everything makes sense, but at the same time it doesn't.

And nowadays, processing and power are money, so I wonder what could be going on behind the scenes. Because I really notice something unusual with today's servers compared to older ones. It seems like they're realizing that whoever is working on the server is a specialist, otherwise they keep sucking up processing until they notice some pattern of someone who knows what they're doing to stop it.

I just wanted to know if this is possible to happen in a camouflaged way, because that's what I've been feeling, at least with my Hostgator servers it's like that.

Snapey's avatar

perhaps you are just seeing bursts of internet traffic looking for misconfigured servers

1 like
martinbean's avatar

@mvnobrega You should be actually investigating the issue, instead of coming up with a completely random hypothesis (“is my database mining crypto?”) and then going down that path.

Use a process viewer such as htop to actually inspect what is using CPU on your server(s). That will then point you in the direction of which process(es) are consuming high amounts of CPU, and where to focus your efforts.

2 likes
scotty2hotty's avatar

Noticed weird CPU spikes on my small server setups too, even with low-traffic sites. While I’m no expert, logging everything helped me spot patterns. Using tradelytic for tracking trades gave me an idea—keeping detailed logs makes it easier to see unusual activity. Maybe digging into query patterns or background tasks could show if something shady is running, or if it’s just the database acting up.

Please or to participate in this conversation.