首先选择要安装的版本:
MySQL 版本号
8.0
Debian/Ubuntu 用户
再选择你的 Debian/Ubuntu 版本,文本框中内容写进 /etc/apt/sources.list.d/mysql-community.list
发行版
Debian 12 (bookworm)
deb https://mirrors.tuna.tsinghua.edu.cn/mysql/apt/debian bookworm mysql-8.0 mysql-tools
参考文档:https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
RHEL/CentOS 用户
新建 /etc/yum.repos.d/mysql-community.repo,内容如下:
注:mysql-8.0, mysql-connectors 和 mysql-tools 在 RHEL 7/8 上还提供了 aarch64 版本。
发行版
CentOS/RHEL 7
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-connectors-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
[mysql-tools-community]
name=MySQL Tools Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-tools-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
[mysql-8.0-community]
name=MySQL 8.0 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-8.0-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
参考文档:https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
评论