TMAegis
Thêm quy tắc cho mysql

TMA-MYSQL-1.1

Place Databases on Non-System Partitions

ThấpCấp 1Xem xét thủ côngmysql

Mô tả

It is generally accepted that host operating systems should include different filesystem partitions for different purposes. One set of filesystems is typically called system partitions, and these are generally reserved for host system/application operation.

Cách kiểm tra

Phương pháp kiểm tra: Xem xét thủ công

Khuyến nghị này không thể kiểm tra tự động. Lần quét sẽ liệt kê mục này kèm hướng dẫn khi bạn truyền cờ --include-manual.

Find the data and log locations: SELECT VARIABLE_NAME, VARIABLE_VALUE FROM performance_schema.global_variables WHERE (VARIABLE_NAME LIKE '%dir' OR VARIABLE_NAME LIKE '%file') AND VARIABLE_NAME NOT LIKE '%core%'; then run df -h <directory> for datadir and the others. They must not be on the root (/), /var or /usr partitions.

Cách khắc phục

Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng

Create a dedicated partition/volume for the data, stop MySQL, move datadir there (copy preserving ownership mysql:mysql), update datadir in /etc/my.cnf (or /etc/mysql/mysql.conf.d/mysqld.cnf) and any SELinux/AppArmor policy, then start MySQL.

Thuộc tính

Hệ điều hành
Bất kỳ
Thẻ
mysqldatabasefilesystemmanual
Tham chiếu
CIS Oracle MySQL Community Server 8.4 Benchmark v1.1.0 - 1.1 Place Databases on Non-System Partitions