Technology Sharing

  • 首页
  • 资料分享
  • 在线工具
    • 随机密码生成器
  • 介绍
  • RSS
  • privacy
  • 云产品推广
    • 腾讯云
    • 阿里云
Share IT knowledge
  1. 首页
  2. linux
  3. 正文

Centos7 yum安装MySQL8

2023年1月12日 264点热度 0人点赞 0条评论
配置MySQL的yum源
yum -y install https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
更新yum仓库
yum repolist
安装MySQL
 yum -y install mysql-community-server

报错:

warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-icu-data-files-8.0.29-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql


The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.


 Failing package is: mysql-community-icu-data-files-8.0.29-1.el7.x86_64
 GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

解决:

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
yum -y install mysql-community-server
或者
yum -y install mysql-community-server  --nogpgcheck 
启动MySQL服务,并设置开机自启
systemctl start mysqld
systemctl enable mysqld
查找初始密码
# 查看初始密码(如无内容直接跳过)
grep 'temporary password' /var/log/mysqld.log
MySQL安全设置

根据提示选择操作

#执行下面命令需要输入初始密码
mysql_secure_installation
打赏微海报分享
标签: 暂无
最后更新:2023年1月12日

nico

Linux运维工程师 软考网络工程师 && 软考信息安全工程师

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

nico

Linux运维工程师
软考网络工程师 && 软考信息安全工程师

最新 热点 随机
最新 热点 随机
linux部署JDK环境 [Solved] MariaDB import issue: Error at line 1: Unknown command '\-'. Could not retrieve mirrorlist http://mirrorlist.centos.org/ CentOS 7 Kubernetes如何删除卡在“Terminating”状态的命名空间 解决GitLab Runner签名无效 如何禁用 Ubuntu "Daemons using outdated libraries" 弹出窗口
[SOLVED] extension "vector" is not available nginx正向代理 如何在PHP中修改时区设置 清除Linux内存缓存和交换空间的方法 Linux设置默认 ACL 以授予此目录中创建的任何新文件或目录都将继承这些权限 如何为某些用户禁用 SSH 密码验证
最近评论
woodcockkienzlelsj8o9+73s48g9rr3m0@gmail.com 发布于 11 个月前(07月17日) necessitatibus corporis et odit nam quo harum et c...
RonaldG 发布于 11 个月前(07月07日) Very interesting topic, thank you for putting up.&...
小黑 发布于 1 年前(12月28日) 不错
nico 发布于 2 年前(02月09日) 嘻嘻嘻!!!
Bruse 发布于 2 年前(02月09日) 我来啦!!!
nico 发布于 3 年前(12月10日) 方便查询
Justin 发布于 3 年前(12月10日) 写的很好,谢谢分享!我 Mark 一下~
nico 发布于 3 年前(11月18日) 主题的原因吧
Justin 发布于 3 年前(09月22日) 这篇文章的质量很高呀!写得很详细~ 话说你的文章是隐藏了发布时间吗?
Justin 发布于 3 年前(08月27日) 好家伙,这标题乍一看还以为你打算进军英文技术写作领域了🤓

COPYRIGHT © 2023 Technology Sharing. ALL RIGHTS RESERVED.

备案图标 皖公网安备34132402000202 皖ICP备2023004851号-1