# MySQL

{% hint style="info" %}
MySQL(CentOS)ログ分析
{% endhint %}

### 1. mysql.confダウンロードrsyslog使用 <a href="#id-1" id="id-1"></a>

```
curl https://repo.plura.io/v5/module/rsyslog/80-mysql.conf -o /etc/rsyslog.d/80-mysql.conf
```

### 2. 80-mysql.conf 修整 <a href="#id-2" id="id-2"></a>

* mysql error ログ位置確認

```
vi /etc/rsyslog.d/80-mysql.conf
```

### 3. rsyslog デーモン再起動 <a href="#id-3" id="id-3"></a>

```
service rsyslog restart
```

### 4. 探知確認 <a href="#id-4" id="id-4"></a>

* ログ例 : 全体ログ > ホスト

<figure><img src="/files/fR2Ll7UYlD1PKGZt1rny" alt=""><figcaption></figcaption></figure>

* [x] 上記の内容を活用してフィルターを登録すると、探知ログを確認することができます。

> ​[https://docs.plura.io/ja/fn/comm/filter/syslog](https://docs.plura.io/ja/function/common/filter/syslog)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plura.io/ja/agents/siem/uplc/mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
