我更改 my.cnf 以添加 innodb_log_file_size 设置,当尝试启动服务器时,它失败并在错误日志中显示以下内容:
[Note] InnoDB: Using mutexes to ref count buffer pool pages
[Note] InnoDB: The InnoDB memory heap is disabled
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
[Note] InnoDB: Compressed tables use zlib 1.2.7
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Using SSE crc32 instructions
[Note] InnoDB: Initializing buffer pool, size = 128.0M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: Highest supported file format is Barracuda.
[Note] InnoDB: The log sequence number 10942739155 in ibdata file do not match the log sequence number 11517047974 in the ib_logfiles!
[Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
[ERROR] InnoDB: The page [page id: space=0, page number=7] in file ./ibdata1 cannot be decrypted.
[Note] InnoDB: However key management plugin or used key_version 1 is not found or used encryption algorithm or method does not match.
[ERROR] InnoDB: Ending processing because of a corrupt database page.
InnoDB: Assertion failure in thread 139948494317824 in file ha_innodb.cc line 21960
以下是 my.cnf :
中的内容[mysqld]
log-error=/var/lib/mysql/error-log.err
performance-schema=0
default-storage-engine=innodb
innodb_file_per_table=1
query-cache-type = 1
query-cache-size = 256M
local-infile=0
bind-address=127.0.0.1
innodb_log_file_size = 256M
plugin-load-add=file_key_management
file_key_management_filename=/path-to-key/secret.txt
file_key_management_encryption_algorithm=AES_CTR
innodb-encrypt-tables
innodb-encrypt-log
innodb-encryption-threads = 4
innodb-encrypt-tables=FORCE
innodb-tablespaces-encryption
max_allowed_packet=268435456
open_files_limit=10000
innodb_fast_shutdown 设置为 1 。此外,我在重新启动之前删除(重命名)了 ib_logfile0 和 ib_logfile1 。数据库使用静态加密。有什么想法吗?
MariaDB版本:10.1.26