MariaDB
TMA-MARIADB-6.1
Ensure 'log_error' is configured correctly
Açıklama
The error log contains information about events such as mariadbd starting and stopping, when a table needs to be checked or repaired, and, depending on the host operating system, stack traces when mariadbd fails. Fails when log_error is empty, stderr or ./stderr.err. Runs mariadb -NBe with the client defaults: as root on the server the unix_socket plugin usually authenticates; otherwise put an administrative account in ~/.my.cnf (mode 0600), not MYSQL_PWD (see 1.4/1.6).
Nasıl denetlenir
Denetim yöntemi: SQL sorgusu
out=$(mariadb -NBe "SELECT IF(IFNULL(@@global.log_error, '') NOT IN ('', 'stderr') AND @@global.log_error NOT LIKE '%stderr.err', 'compliant', 'noncompliant')" 2>/dev/null) || exit 1; printf '%s\n' "$out"- Beklenen çıktı
compliant
Nasıl düzeltilir
Düzeltme yöntemi: Kılavuz veya altyapı yaması
Set log_error=<path to error log file> under [mariadbd] in /etc/mysql/mariadb.conf.d/50-server.cnf (or /etc/my.cnf.d/server.cnf), then restart MariaDB.
Özellikler
- İşletim sistemleri
- Herhangi biri
- Etiketler
- mariadbdatabaselogging
- Referans
- CIS MariaDB 10.11 Benchmark v1.0.0 - 6.1 Ensure 'log_error' is configured correctly
Bu ana makineyi denetle
Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.
tmaegis scan --target mariadb