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


搞定!

相关推荐
**蓝桉**3 小时前
mysql二进制部署
mysql
炸膛坦客3 小时前
Linux - Ubuntu - PC端:(三)切换中英文,Fcitx5
linux·ubuntu
7yewh3 小时前
jetson_yolo_deployment 01_linux_dev_env
linux·嵌入式硬件·yolo·机器人·嵌入式
夕除3 小时前
Mysql--07
数据库·mysql
cyber_两只龙宝3 小时前
【Haproxy】Haproxy的算法详解及配置
linux·运维·服务器·云原生·负载均衡·haproxy·调度算法
阿常呓语3 小时前
Linux命令 jq详解
linux·运维·shell·jq
顶点多余4 小时前
Mysql--后端与前端关系
数据库·mysql
mygljx4 小时前
【MySQL 的 ONLY_FULL_GROUP_BY 模式】
android·数据库·mysql
sunwenjian8864 小时前
Springboot项目本地连接并操作MySQL数据库
数据库·spring boot·mysql
君生我老4 小时前
Linux 权限
linux