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


搞定!

相关推荐
索西引擎1 小时前
MySQL 进阶:视图、存储过程、存储函数与触发器
数据库·mysql
bksczm2 小时前
InnoDB 通用表空间与临时表空间详解
大数据·数据库·mysql
靠沿3 小时前
MySQL数据库进阶——存储过程和触发器
java·数据库·mysql
码少女3 小时前
MySQL--库与表的增删改查基础
java·数据库·mysql
Eyfcom4 小时前
〖物流 SaaS 实战 02〗SaaS 租户的计费与订阅模型:从“一锤子买卖”到“按需订阅”
linux·服务器·数据库·快递系统·物流saas实战
打工的小王4 小时前
postgresql和mysql对比
数据库·mysql·postgresql
忆挽篱笙歌6 小时前
systemV进程通信
linux·运维·服务器
codeejun7 小时前
每日一Go·MySQL-15、慢查询日志实战分析(从 0 到 1 实战排查慢 SQL)
sql·mysql·golang
Decay__9 小时前
SQLServer 监控体系构建 —— sql_exporter + Prometheus + Grafana 全栈实战
运维·数据库·sql·mysql·架构