在 MySQL 8.3 实例中,如果表的
.frm文件与InnoDB数据字典之间存在模式不匹配,可能会导致升级到 MySQL 8.4 失败。这种不匹配可能是由于.frm文件损坏引起的。为了解决此问题,在再次尝试升级之前,请转储并恢复受影响的表。A schema mismatch in a MySQL 8.3 instance between the.frmfile of a table and theInnoDBdata dictionary can cause an upgrade to MySQL 8.4 to fail. Such mismatches may be due to.frmfile corruption. To address this issue, dump and restore affected tables before attempting the upgrade again.如果出现问题,例如新的 mysqld 服务器无法启动,请确认你没有来自之前安装的旧
my.cnf文件。你可以使用--print-defaults选项检查(例如,mysqld --print-defaults)。如果此命令显示的内容除了程序名称之外还有其他信息,那么你有一个正在生效的my.cnf文件,它会影响服务器或客户端的运行。If problems occur, such as that the new mysqld server does not start, verify that you do not have an oldmy.cnffile from your previous installation. You can check this with the--print-defaultsoption (for example, mysqld --print-defaults). If this command displays anything other than the program name, you have an activemy.cnffile that affects server or client operation.如果在升级后,您在编译的客户端程序中遇到问题,例如
Commands out of sync或意外的核心转储,那么很可能是在编译程序时使用了旧的头文件或库文件。在这种情况下,请检查您的mysql.h文件和libmysqlclient.a库的日期,以确认它们是否来自新的 MySQL 发行版。如果不是,请使用新头文件和库重新编译您的程序。如果共享客户端库的主要版本号发生变化(例如,从libmysqlclient.so.20到libmysqlclient.so.21),也可能需要重新编译针对该共享客户端库编译的程序。If, after an upgrade, you experience problems with compiled client programs, such asCommands out of syncor unexpected core dumps, you probably have used old header or library files when compiling your programs. In this case, check the date for yourmysql.hfile andlibmysqlclient.alibrary to verify that they are from the new MySQL distribution. If not, recompile your programs with the new headers and libraries. Recompilation might also be necessary for programs compiled against the shared client library if the library major version number has changed (for example, fromlibmysqlclient.so.20tolibmysqlclient.so.21).如果您创建了一个具有特定名称的可加载函数,并将 MySQL 升级到一个实现了同名新内置函数的版本,则该可加载函数将无法访问。为纠正此问题,请使用
DROP FUNCTION删除该可加载函数,然后使用CREATE FUNCTION以不同的不冲突名称重新创建该可加载函数。如果新版本的 MySQL 实现了与现有存储函数同名的内置函数,也适用相同的规则。请参阅 第 11.2.5 节,“函数名称解析和解析”,了解服务器如何解析对不同类型函数的引用的规则。If you have created a loadable function with a given name and upgrade MySQL to a version that implements a new built-in function with the same name, the loadable function becomes inaccessible. To correct this, useDROP FUNCTIONto drop the loadable function, and then useCREATE FUNCTIONto re-create the loadable function with a different nonconflicting name. The same is true if the new version of MySQL implements a built-in function with the same name as an existing stored function. See Section 11.2.5, “Function Name Parsing and Resolution”, for the rules describing how the server interprets references to different kinds of functions.如果升级到 MySQL 8.4 因 第 3.6 节,“为升级准备您的安装” 中列出的任何问题而失败,服务器会将数据目录的所有更改还原。在这种情况下,删除所有重做日志文件,并在现有数据目录上重新启动 MySQL 8.3 服务器以解决错误。重做日志文件(
ib_logfile*)默认位于 MySQL 数据目录中。错误修复后,在再次尝试升级之前,请执行慢速关闭(通过设置innodb_fast_shutdown=0)。If upgrade to MySQL 8.4 fails due to any of the issues outlined in Section 3.6, “Preparing Your Installation for Upgrade”, the server reverts all changes to the data directory. In this case, remove all redo log files and restart the MySQL 8.3 server on the existing data directory to address the errors. The redo log files (ib_logfile*) reside in the MySQL data directory by default. After the errors are fixed, perform a slow shutdown (by settinginnodb_fast_shutdown=0) before attempting the upgrade again.