CentOS 8 Stream环境下通过yum安装Mysql
1.在Mysql下载页面MySQL :: Download MySQL Community Server页尾
点击 “MD5 checksums and GnuPG signatures” 进入下一页面
2.打开下载yum repo文件页面 (MySQL :: Download MySQL Yum Repository)
3.点击"DownLoad"按钮,打开下载页面,
4.获取链接地址,进入平台,
wget https://dev.mysql.com/get/mysql84-community-release-el8-1.noarch.rpm
5.在使用yum时,如报如下错误
6.更换国内yum镜像源
常见的几个yum源
阿里源:阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区
腾讯源:腾讯软件源
网易源:欢迎访问网易开源镜像站
清华源:清华大学开源软件镜像站 | Tsinghua Open Source Mirror
华为源: https://mirrors.huaweicloud.com/
但网易源与清华源在默认路径下找不repomd.xml文件,
所以,这里简单配置成阿里云和腾讯云:
先备份
mv yum.repos.d yum.repos.d_backup
mkdir yum.repos.d
cd yum.repos.d
创建腾讯源
touch tencent-Centos-Stream-8.repo
编辑入如下内容
[BaseOS]
name=BaseOS -tencent
baseurl=https://mirrors.cloud.tencent.com/centos/8-stream/BaseOS/x86_64/os/
enabled=1
gpgcheck=0
[Appstream]
name=Appstream -tencent
baseurl=https://mirrors.cloud.tencent.com/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=0
[Extras]
name=Extras -tencent
baseurl=https://mirrors.cloud.tencent.com/centos/8-stream/extras/x86_64/os/
enabled=1
gpgcheck=0
[PowerTools]
name=PowerTools -tencent
baseurl=https://mirrors.cloud.tencent.com/centos/8-stream/PowerTools/x86_64/os/
enabled=1
gpgcheck=0
创建阿里源
touch aliyun-Centos-Stream-8.repo
配置:
[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=http://mirrors.aliyun.com/$contentdir/$stream/BaseOS/$basearch/os/
gpgcheck=0
enabled=1
#additional packages that may be useful
[extras]
name=CentOS Stream $releasever - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/$contentdir/$stream/extras/$basearch/os/
gpgcheck=0
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS Stream $releasever - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/$contentdir/$stream/centosplus/$basearch/os/
gpgcheck=0
enabled=0
[PowerTools]
name=CentOS Stream $releasever - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/$contentdir/$stream/PowerTools/$basearch/os/
gpgcheck=0
enabled=0
[AppStream]
name=CentOS Stream $releasever - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/$contentdir/$stream/AppStream/$basearch/os/
gpgcheck=0
安装Mysql的yum repo
yum -y localinstall mysql84-community-release-el8-1.noarch.rpm
更新缓存
yum clean all && yum makecache
禁用Centos stream 8 自带的Mysql
yum module disable mysql
安装MySQL、
yum install -y mysql-community-server
报错误
导入的密钥没有公钥,错误的公钥? mysql-community-client-8.0.40-1.el8.x86_64.rpm 的公钥没有安装.
更换MySQL的版本
gpg --import mysql_pubkey.asc
参考:在Centos上安装MySQL_centos 安装mysql-CSDN博客
参考: https://zhuanlan.zhihu.com/p/689885547
问题:Do you already have another mysqld server running on port: 3306
netstat -tulnp | grep 3306
docker ps -q | xargs docker stop //停止所有的docker
原文地址:https://blog.csdn.net/freellf/article/details/143080966
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!