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


搞定!

相关推荐
这个DBA有点耶12 小时前
NULL不是空——数据库里最反直觉的设计,90%新人踩过的坑
数据库·mysql·代码规范
orion571 天前
Missing Semester Class1:course overview and introduction of shell
linux
用户120487221612 天前
Linux驱动编译与加载
linux·嵌入式
这个DBA有点耶2 天前
SQL改写进阶:标量子查询的“隐形代价”与消除实战
数据库·mysql·架构
smallyoung2 天前
数据库乐观锁深度解析:MySQL、PostgreSQL 实战 + Spring Boot 集成指南
数据库·mysql·postgresql
用户805533698032 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698032 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
数据技术说2 天前
MySQL 迁移实战——如何实现真正的"零改造"平滑切换
mysql
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia3 天前
linux curl命令详解_curl详解
linux