

CentOS7使用yum在线安装mysql5.7
source link: https://blog.51cto.com/u_15867943/5994393
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CentOS7使用yum在线安装mysql5.7
精选 原创1.安装wget
yum install -y wget

2、下载rpm安装包
[root@nifi1 home]# wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
2.1 yum安装mysql 5.7
yum -y install mysql57-community-release-el7-10.noarch.rpm

2.2yum安装mysql-community-server
yum -y install mysql-community-server

安装失败由于MySQL GPG 密钥已过期导致的需要运行命令, 以2022年为例
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
yum -y install mysql-community-server


至此yum安装MySQL服务结束!
3.MySQL数据库设置
3.1启动MySQL
systemctl start mysqld.service
3.2查看MySQL运行状态
systemctl status mysqld.service

4.在日志文件中找出密码
grep "password" /var/log/mysqld.log
5.进入数据库
mysql -uroot -p # 回车后会提示输入密码
6.在日志文件中找出密码
grep "password" /var/log/mysqld.log
7.进入数据库
mysql -uroot -p # 回车后会提示输入密码
8.设置mysql密码
8.1修改变更,便于修改简单密码
set global validate_password_policy=0;
set global validate_password_length=1;
8.2修改密码
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
8.3远程授权,便于使用navicat等远程客户端连接
grant all on *.* to root@'%' identified by 'root';
9.登录测试
mysql -uroot -p

- 2赞
- 2收藏
- 评论
- 分享
- 举报
Recommend
-
98
mysql5.7新增的特性中主要的一方面就是极大增强了安全性,安装Mysql后默认会为root@localhost用户创建一个随机密码,这个随机密码在不同系统上需要使用不同方式查找,否则无法登录mysql并修改初始密码。以下以Centos 7为例介绍如何找到初始的随机密码。在低于Mysql...
-
50
MySQL5.7一键安装脚本
-
10
安装前的准备 Step1: 如果你系统已经有mysql,如一般centos自带mysql5.1系列,那么你需要删除它,先检查一下系统是否自带mysql yum list installed | grep mysql Step2: 删除系统自带的mysql及其依赖命令
-
12
华为云 centos7 with arm 面板安装成功,mysql5.7安装失败
-
8
GitLab Community Edition 新版本已经集成了 CI/CD 的支持,从某种程度上来说可以告别对于 Jenkins 的依赖,我本来计划是写基于 Docker 部署 GitLab 但感觉还是有点重,对于内网离线环境来说基于容器部署也未必是合理的方案,这里沿用传统的部署方式介绍简单且...
-
9
在centos 7中使用yum安装php 7 启用该源即可:yum -y install centos-release-scl.noarch 配置文件路径在:/etc/opt/rh/ 要执行脚本:/opt/rh/rh-php72/register来注册
-
6
本文章主要记载MySql 5.7.38的下载安装教程,过程很详细,也很易懂。Navicat 为数据库管理、开发和维护提供了直观而强大的图形界面,我们可以用Navicat工具上操作MySql。 一、MySql下载 1、 官网下载: MySql5.7.38版本...
-
12
###Centos7同步阿里yum仓库 搭建yum私有仓库 原创 韦建国 2022-06-30 08:...
-
7
CentOS6.8 YUM安装Percona-toolkit及详细使用1. Percona-toolkit简介Percona Toolkit is a collection of advanced command-line tools used by Percona) support staff to perform a variety of
-
4
二进制安装MySQL5.7并搭建主从 精选 原创 阿基米德VS小豆芽 2022-08-31 17:28:21
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK