文档首页
MySQL 8.4 参考手册
8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

8.2.9 保留账户8.2.9 Reserved Accounts

MySQL 安装过程的一部分是数据目录的初始化(参见 第 2.9.1 节,“初始化数据目录”)。在数据目录初始化期间,MySQL 会创建应视为保留的用户账户:One part of the MySQL installation process is data directory initialization (see Section 2.9.1, “Initializing the Data Directory”). During data directory initialization, MySQL creates user accounts that should be considered reserved:

  • 'root'@'localhost:用于管理目的。该账户具有所有权限,是一个系统账户,可以执行任何操作。'root'@'localhost: Used for administrative purposes. This account has all privileges, is a system account, and can perform any operation.

    严格来说,这个账户名并不是保留名,因为在一些安装中,会将root账户重命名为其他名称,以避免暴露一个具有高度权限且众所周知的账户名。Strictly speaking, this account name is not reserved, in the sense that some installations rename the root account to something else to avoid exposing a highly privileged account with a well-known name.

  • 'mysql.sys'@'localhost':用作sys模式对象的DEFINER。使用mysql.sys账户可以避免 DBA 重命名或删除root账户时出现的问题。此账户已被锁定,因此无法用于客户端连接。'mysql.sys'@'localhost': Used as the DEFINER for sys schema objects. Use of the mysql.sys account avoids problems that occur if a DBA renames or removes the root account. This account is locked so that it cannot be used for client connections.

  • 'mysql.session'@'localhost':由插件内部使用以访问服务器。该账户已被锁定,因此不能用于客户端连接。该账户是系统账户。'mysql.session'@'localhost': Used internally by plugins to access the server. This account is locked so that it cannot be used for client connections. The account is a system account.

  • 'mysql.infoschema'@'localhost':用作INFORMATION_SCHEMA 视图的DEFINER。使用mysql.infoschema账户可以避免在 DBA 重命名或删除 root 账户时出现的问题。该账户已被锁定,因此不能用于客户端连接。'mysql.infoschema'@'localhost': Used as the DEFINER for INFORMATION_SCHEMA views. Use of the mysql.infoschema account avoids problems that occur if a DBA renames or removes the root account. This account is locked so that it cannot be used for client connections.