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


搞定!

相关推荐
tntxia8 小时前
linux curl命令详解_curl详解
linux
扛枪的书生11 小时前
Linux 网络管理器用法速查
linux
顺风尿一寸14 小时前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode20 小时前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫1 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux
AlfredZhao3 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80
唐青枫3 天前
MySQL JSON 实战详解:从存储、查询、更新到 JSON_TABLE 与索引
sql·mysql
小满8783 天前
5.Mysql事务隔离级别与锁机制
mysql
元Y亨H4 天前
技术笔记:MySQL 字符集排序规则与大小写敏感性问题解决方案
mysql
戴为沐4 天前
Linux内存扩容指南
linux