linux下使用yum安装mysql

本文使用常规方式手动安装mysql

第一步

下载mysql的repo源

bash 复制代码
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

第二步

安装mysql-community-release-el7-5.noarch.rpm包

bash 复制代码
rpm -ivh mysql-community-release-el7-5.noarch.rpm

第三步

安装mysql-server

bash 复制代码
yum -y install mysql-server

第四步

启动mysql

bash 复制代码
service mysqld start

第五步

修改密码:首次安装启动后默认是没有密码的

bash 复制代码
mysql -uroot
use mysql;
update user set password=password("123456") where user="root";
grant all privileges on *.* to root@"%" identified by "123456";
flush privileges;
exit


搞定!

相关推荐
百结2149 分钟前
Mysql数据库操作
数据库·mysql·oracle
ego.iblacat1 小时前
MySQL 服务基础
数据库·mysql
如意.7591 小时前
【Linux开发工具实战】Git、GDB与CGDB从入门到精通
linux·运维·git
Thera7771 小时前
C++ 高性能时间轮定时器:从单例设计到 Linux timerfd 深度优化
linux·开发语言·c++
爱吃土豆的马铃薯ㅤㅤㅤㅤㅤㅤㅤㅤㅤ3 小时前
Linux 查询某进程文件所在路径 命令
linux·运维·服务器
攒了一袋星辰3 小时前
高并发强一致性顺序号生成系统 -- SequenceGenerator
java·数据库·mysql
顶点多余4 小时前
使用C/C++语言链接Mysql详解
数据库·c++·mysql
安当加密4 小时前
无需改 PAM!轻量级 RADIUS + ASP身份认证系统 实现 Linux 登录双因子认证
linux·运维·服务器
内卷焦虑人士4 小时前
Windows安装WSL2+Ubuntu 22.04
linux·windows·ubuntu
Seven976 小时前
MySQL语句执行深度剖析:从连接到执行的全过程
mysql