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 小时前
Flink MySQL source 自定义开发步骤
大数据·mysql·flink
浅念-6 小时前
Linux 开发环境与工具链
linux·运维·服务器·数据结构·c++·经验分享
idolao8 小时前
MySQL 5.7 安装教程:详细步骤+自定义安装+命令行客户端配置(Windows版)
数据库·windows·mysql
似水এ᭄往昔8 小时前
【Linux】gdb的使用
linux·运维·服务器
tian_jiangnan8 小时前
grafana白皮书
linux·服务器·grafana
20年编程老鸟java+ai全栈8 小时前
mysql、pg、oracel数据库迁移避坑指南
数据库·mysql
mizuhokaga9 小时前
Linux内网集群基于Docker 安装 Chat2DB
linux·运维·docker
西柚0019 小时前
Ubuntu22.04.5 + Docker + MySQL 5.7
mysql·docker·容器
Yvonne爱编码9 小时前
数据库---Day 1 数据库基础
数据库·mysql·oracle
Ricky_Theseus10 小时前
数据库关系代数 - 连接操作
linux·数据库·算法