我通过 5.7.36 安装在 Red Hat 7.9 上运行了 mysql 社区安装程序。
首先,我为所有数据库运行了 xtrabackup 然后我停止了 mysqld 然后我运行了 yum install 一切都结束了我在尝试重新启动 mysqld 时在错误日志中收到以下错误。
[System] [MY-013381] [Server] Server upgrade from '50700' to '80032' started.
[ERROR] [MY-013178] [Server] Execution of server-side SQL statement 'ALTER TABLE mysql.plugin TABLESPACE = mysql; ' failed with error code = 3825, error message = 'Request to create 'encrypted' table while using an 'unencrypted' tablespace.'.
[ERROR] [MY-013380] [Server] Failed to upgrade server.
[ERROR] [MY-010119] [Server] Aborting
我的数据库使用密钥环加密。
my.cnf 配置文件:
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
[mysqld]
early-plugin-load=keyring_file.so
sql_mode=""
bind-address = 0.0.0.0
datadir = /var/lib/mysql
innodb_file_per_table = ON
key_buffer_size = 16M
log-error = /var/log/mysqld.log
max_allowed_packet = 1024M
max_binlog_size = 1000M
max_connections = 150
port = 3306
skip-external-locking
socket = /var/lib/mysql/mysql.sock
tmpdir = /tmp
user = mysql
#server-id = 11211
#log-bin = mysql-bin
innodb_buffer_pool_size = 2560M
innodb_log_buffer_size = 16M
innodb_redo_log_capacity=2GB
[mysqldump]
max_allowed_packet = 1024M
host = localhost
检查了 /var/lib/mysql 目录和文件以及 /var/lib/mysql-keyring/keyring 文件的权限。
[解决了]
问题发生在 mysql_upgrade 步骤无法解密 mysql.plugin 表时,为了避免这种情况,我只是回滚到 5.7,解密所有 MySQL 数据库表并再次运行升级。
它运作良好。