---
title: Malicious IP connected to MySQL database
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > Malicious IP connected to MySQL
  database
---

# Malicious IP connected to MySQL database
Classification:attackTactic:[TA0043-reconnaissance](https://attack.mitre.org/tactics/TA0043)Technique:[T1595-active-scanning](https://attack.mitre.org/techniques/T1595) 
## Goal{% #goal %}

Detect database connections from IP addresses that are identified as malicious. Network access to database servers should be restricted.

## Strategy{% #strategy %}

This rule monitors logs from MySQL to detect when a connection originates from an IP identified as malicious. Datadog enriches all ingested logs with [threat intelligence](https://docs.datadoghq.com/security/threat_intelligence/) in real time.

## Triage and response{% #triage-and-response %}

1. Determine if the user `{{ @db.user }}` is expected to authenticate from the IP `{{ @network.client.ip }}`.
1. Restrict network access to the database. Remove any public access.
1. If the login was successful review database logs for suspicious actions taken by the user `{{ @db.user }}`.
1. Rotate credentials for the affected account.
