Command-Line Format --upgrade=valueIntroduced 8.0.16 Type Enumeration Default Value AUTOValid Values AUTONONEMINIMALFORCEThis option controls whether and how the server performs an automatic upgrade at startup. Automatic upgrade involves two steps:
Step 1: Data dictionary upgrade.
This step upgrades:
The data dictionary tables in the
mysqlschema. If the actual data dictionary version is lower than the current expected version, the server upgrades the data dictionary. If it cannot, or is prevented from doing so, the server cannot run.The Performance Schema and
INFORMATION_SCHEMA.
Step 2: Server upgrade.
This step comprises all other upgrade tasks. If the existing installation data has a lower MySQL version than the server expects, it must be upgraded:
The system tables in the
mysqlschema (the remaining non-data dictionary tables).The
sysschema.User schemas.
For details about upgrade steps 1 and 2, see Section 2.10.3, “What the MySQL Upgrade Process Upgrades”.
These
--upgradeoption values are permitted:AUTOThe server performs an automatic upgrade of anything it finds to be out of date (steps 1 and 2). This is the default action if
--upgradeis not specified explicitly.NONEThe server performs no automatic upgrade steps during the startup process (skips steps 1 and 2). Because this option value prevents a data dictionary upgrade, the server exits with an error if the data dictionary is found to be out of date:
[ERROR] [MY-013381] [Server] Server shutting down because upgrade is required, yet prohibited by the command line option '--upgrade=NONE'. [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.MINIMALThe server upgrades the data dictionary, the Performance Schema, and the
INFORMATION_SCHEMA, if necessary (step 1). Note that following an upgrade with this option, Group Replication cannot be started, because system tables on which the replication internals depend are not updated, and reduced functionality might also be apparent in other areas.FORCEThe server upgrades the data dictionary, the Performance Schema, and the
INFORMATION_SCHEMA, if necessary (step 1). In addition, the server forces an upgrade of everything else (step 2). Expect server startup to take longer with this option because the server checks all objects in all schemas.FORCEis useful to force step 2 actions to be performed if the server thinks they are not necessary. For example, you may believe that a system table is missing or has become damaged and want to force a repair.
The following table summarizes the actions taken by the server for each option value.
Option Value Server Performs Step 1? Server Performs Step 2? AUTOIf necessary If necessary NONENo No MINIMALIf necessary No FORCEIf necessary Yes
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




