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

MySQL 8.4 参考手册 · 中文镜像

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

打开官方英文原文 ↗

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

MySQL 8.4 参考手册 / 2 安装 MySQL / 2.5 在 Linux 上安装 MySQL
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

2.5 在 Linux 上安装 MySQL2.5 Installing MySQL on Linux

Linux 支持多种不同的 MySQL 安装解决方案。我们建议您使用 Oracle 的其中一种发行版,该发行版有多种安装方法:Linux supports a number of different solutions for installing MySQL. We recommend that you use one of the distributions from Oracle, for which several methods for installation are available:

表 2.9 Linux 安装方法和信息Table 2.9 Linux Installation Methods and Information

类型Type 安装方法Setup Method 其他信息Additional Information
AptApt 启用MySQL Apt 存储库Enable the MySQL Apt repository 文档Documentation
YumYum 启用 MySQL Yum 存储库Enable the MySQL Yum repository 文档Documentation
ZypperZypper 启用MySQL SLES 存储库Enable the MySQL SLES repository 文档Documentation
RPMRPM 下载特定包Download a specific package 文档Documentation
DEBDEB 下载特定包Download a specific package 文档Documentation
通用Generic 下载通用包Download a generic package 文档Documentation
源代码Source 从 源Compile from source 文档Documentation
DockerDocker 使用Oracle 容器注册表。您还可以使用 My Oracle Support 获取 MySQL 企业版。Use the Oracle Container Registry. You can also use My Oracle Support for the MySQL Enterprise Edition. 文档Documentation
Oracle Unbreakable Linux NetworkOracle Unbreakable Linux Network 使用 ULN 频道Use ULN channels 文档Documentation

作为替代方案,您可以使用系统上的包管理器从 Linux 发行版的本机软件存储库中自动下载并安装 MySQL 以及包。这些本机包通常比当前可用版本落后几个版本。您通常也无法安装创新版本,因为这些版本通常在本机存储库中不可用。有关使用本机软件包安装程序的详细信息,请参阅第 2.5.7 节 “从本机软件存储库在 Linux 上安装 MySQL”。As an alternative, you can use the package manager on your system to automatically download and install MySQL with packages from the native software repositories of your Linux distribution. These native packages are often several versions behind the currently available release. You are also normally unable to install innovation releases, since these are not usually made available in the native repositories. For more information on using the native package installers, see Section 2.5.7, “Installing MySQL on Linux from the Native Software Repositories”.

Note

对于许多 Linux 安装,您希望将 MySQL 设置为在计算机启动时自动启动。许多本机软件包安装都会为您执行此操作,但对于源代码、二进制和 RPM 解决方案,您可能需要单独进行设置。所需的脚本 mysql.server 可以在 MySQL 安装目录下的 support-files 目录或 MySQL 源代码树中找到。您可以将其安装为 /etc/init.d/mysql 以自动启动和关闭 MySQL。请参阅第 6.3.3 节“mysql.server — MySQL 服务器启动脚本”。For many Linux installations, you want to set up MySQL to be started automatically when your machine starts. Many of the native package installations perform this operation for you, but for source, binary and RPM solutions you may need to set this up separately. The required script, mysql.server, can be found in the support-files directory under the MySQL installation directory or in a MySQL source tree. You can install it as /etc/init.d/mysql for automatic MySQL startup and shutdown. See Section 6.3.3, “mysql.server — MySQL Server Startup Script”.