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