Глобальная переменная-default-table-encryption = on установлен, и табличные пространства зашифруются, как и ожидалось. br /> Теперь я хочу включить шифрование для unn-and redo-log. Следуя документам, это может быть сделано с помощью--innodb-redo-log-encryption = on и -nnodb-undo-log-encryption = on
Как только я пытаюсь включить их, я получаю ошибку при запуске БД: < /p>
Код: Выделить всё
[ERROR] [MY-012676] [InnoDB] Check keyring fail, please check the keyring is loaded.
[ERROR] [MY-010202] [Server] Plugin 'InnoDB' init function returned error.
[ERROR] [MY-010734] [Server] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] [MY-010168] [Server] Failed to initialize builtin plugins.
Код: Выделить всё
version: '3.1'
services:
db:
build:
context: .
dockerfile: mysql.Dockerfile
cap_add:
- SYS_NICE
restart: always
environment:
MYSQL_DATABASE: xxx
MYSQL_USER: xxx
MYSQL_PASSWORD: xxx
MYSQL_ROOT_PASSWORD: xxx
volumes:
- db:/var/lib/mysql
# setup app database
- ./db/create_database_and_user.sh:/docker-entrypoint-initdb.d/create_database_and_user.sh
- ./db/install_keyring_udf.sh:/docker-entrypoint-initdb.d/install_keyring_udf.sh
ports:
- "3306:3306"
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp
volumes:
db:
driver: local
< /code>
dockerfile: < /p>
# Use the official MySQL 8 image from the Docker Hub
FROM mysql:8.0
# Copy mysql manifest file which enables component_keyring_file component
COPY ./keyring/mysqld.my /usr/sbin/mysqld.myvar
# Copy config for component_keyring_file component
COPY ./keyring/component_keyring_file.cnf /usr/lib64/mysql/plugin/component_keyring_file.cnf
# Copy keyring file
COPY ./keyring/component_keyring_file /var/lib/mysql-keyring/component_keyring_file
RUN chown 999:999 /var/lib/mysql-keyring/component_keyring_file
RUN chmod 700 /var/lib/mysql-keyring/component_keyring_file
# Expose the MySQL port
EXPOSE 3306
# Start MySQL server
CMD ["mysqld", "--default-table-encryption=ON", "--innodb-redo-log-encrypt=ON", "--innodb_undo_log_encrypt=ON"]
< /code>
mysqld.my
{
"components": "file://component_keyring_file"
}
< /code>
component_keyring_file.cnf
{
"path": "/var/lib/mysql-keyring/component_keyring_file",
"read_only": false
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... yption-tde
Мобильная версия