暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

MySQL upgrade

原创 wzf0072 2023-07-11
133
  • upgrade=value

    Command-Line Format--upgrade=value
    Introduced8.0.16
    TypeEnumeration
    Default ValueAUTO
    Valid Values

    AUTO

    NONE

    MINIMAL

    FORCE

    This 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 mysql schema. 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 mysql schema (the remaining non-data dictionary tables).

      • The sys schema.

      • User schemas.

    For details about upgrade steps 1 and 2, see Section 2.10.3, “What the MySQL Upgrade Process Upgrades”.

    These --upgrade option values are permitted:

    • AUTO

      The server performs an automatic upgrade of anything it finds to be out of date (steps 1 and 2). This is the default action if --upgrade is not specified explicitly.

    • NONE

      The 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.
    • MINIMAL

      The 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.

    • FORCE

      The 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.

      FORCE is 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 ValueServer Performs Step 1?Server Performs Step 2?
    AUTOIf necessaryIf necessary
    NONENoNo
    MINIMALIf necessaryNo
    FORCEIf necessaryYes
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论