MySQL(二)yum源与rpm包方式安装

本文详细介绍了在Linux系统中通过yum源和rpm包两种方式安装MySQL的过程,包括yum源的配置、服务的启动与停止、密码设置等关键步骤,帮助初级运维人员掌握MySQL的安装技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、yum源方式安装

1、官网下载包

2、安装
[root@www ~]# yum install -y https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm

[root@www ~]# ls /etc/yum.repos.d/

3、过滤
[root@www ~]# yum list | grep "mysql-community"
mysql-community-server.x86_64 5.7.19-1.el7 mysql57-community
mysql-community-client.x86_64 5.7.19-1.el7 mysql57-community

4、安装服务端和客户端
[root@www ~]# yum install mysql-community-client mysql-community-server -y

5、启动
[root@www etc]# systemctl start mysqld

6、登录
[root@www etc]# mysql -uroot -p
Enter password:
提示无法登录

7、跳过密码登录
[root@www etc]# vim /etc/my.cnf
写入下面一行:
skip-grant-tables
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值