TMAegisBeta
更多 mysql 規則

MySQL

TMA-MYSQL-8.3

Set Maximum Connection Limits for Server and per User

低等級 1人工審核mysql

說明

Limiting concurrent connections to a MySQL server can be used to reduce risk of Denial of Service (DoS) attacks performed by exhausting connection resources.

檢查方式

稽核方法: 人工審核

此項建議無法自動檢查。當您傳入 --include-manual 時,掃描結果會列出此項目並附帶這些說明。

Run SELECT VARIABLE_NAME, VARIABLE_VALUE FROM performance_schema.global_variables WHERE VARIABLE_NAME LIKE 'max_%connections'; (max_user_connections 0 = no limit) and SELECT user, host, max_user_connections FROM mysql.user WHERE user NOT LIKE 'mysql.%' AND user <> 'root'; (0 = global value applies). No server or per-user limit is a fail.

修補方式

修補方法: 操作指南或基礎設施修補檔

Set max_connections and max_user_connections under [mysqld] (SET GLOBAL to apply now) and per account with ALTER USER '<user>'@'<host>' WITH MAX_USER_CONNECTIONS <n>;

屬性

作業系統
不限
標籤
mysqldatabaseavailabilitymanual
參考資料
CIS Oracle MySQL Community Server 8.4 Benchmark v1.1.0 - 8.3 Set Maximum Connection Limits for Server and per User