> For the complete documentation index, see [llms.txt](https://docs.plura.io/ja/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plura.io/ja/agents/siem/uplc/mysql.md).

# 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="https://2905490945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fggd4Oi5rCa2J3EuvDJKc%2Fuploads%2FDWO8MOP2785AExD47whM%2Fimage.png?alt=media&amp;token=01dbd304-52b6-4119-8905-7f28bc86839b" alt=""><figcaption></figcaption></figure>

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

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