---
title: "NET-DB-017 MySQL Error Log Not Configured"
canonical: https://openvapt.com/checks/NET-DB-017.html
html: https://openvapt.com/checks/NET-DB-017.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-14
version: 0.1.0-alpha.6
---

# NET-DB-017 MySQL Error Log Not Configured

log_error is not set, so server errors, failed logins and startup warnings go to the console or syslog without a dedicated, retained file.

- Domain: Network
- Severity: Low
- Control category: Logging and Monitoring
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`
- CIS Controls v8: 8.2
- NIST CSF 2.0: PR.PS-04
- CWE: CWE-778
- OWASP Top 10 2021: A09:2021
- OWASP ASVS 4.0.3: 7.1.1
- NIST SP 800-53 Rev. 5: AU-2, AU-12
- Benchmark topic: Database error logging (topic only, no benchmark text)

## Why It Matters

The error log is the first place to see authentication failures, crashes and plugin warnings. A named file with rotation makes those events available to incident response and to the audit checks that read it.

## How It Detects

Parses the option files for log_error (or log-error) under [mysqld]. Fails when absent.

## How to Fix

Add  log_error = /var/log/mysql/error.log  under [mysqld], make the folder writable by the mysql user, and add a logrotate rule.

## How to Verify

```
SHOW VARIABLES LIKE 'log_error';  should print the file path.
```

## Learn the Theory

- [P3 Network Exposure and Firewalls](https://openvapt.com/academy/p3.md)
- [P8 Data Services: Databases, File Shares, DNS and Mail](https://openvapt.com/academy/p8.md)
- [P19 Database, Mail and DNS Hardening](https://openvapt.com/academy/p19.md)

## References

- [MySQL 8.4 Reference Manual, The Error Log](https://dev.mysql.com/doc/refman/8.4/en/error-log.html)
- [MySQL 8.4 Reference Manual, Server System Variables](https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/network/data_depth.go

Run it: `openvapt scan --only NET-DB-017`. Read it offline: `openvapt explain NET-DB-017`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/NET-DB-017.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
