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


搞定!

相关推荐
2401_8772742415 分钟前
从匿名管道到 Master-Slave 进程池:Linux 进程间通信深度实践
linux·服务器·c++
feng_you_ying_li37 分钟前
linux之用户的权限详解(4)
linux·运维·服务器
eggwyw44 分钟前
完美解决phpstudy安装后mysql无法启动
数据库·mysql
java修仙传1 小时前
MySQL 事务隔离级别详解
数据库·mysql·oracle
Irissgwe1 小时前
MySQL存储过程和触发器专题
数据库·mysql·oracle
二进制person2 小时前
JavaEE初阶 --网络编程
linux·服务器·网络
Cyber4K2 小时前
【妙招系列】Harbor 镜像私有仓库搭建手册
linux·云原生·容器
Irissgwe3 小时前
进程间通信
linux·服务器·网络·c++·进程间通信
创世宇图3 小时前
阿里云Alibaba Cloud Linux 4 LTS 64位生产环境配置-Nginx
linux·nginx
skiy4 小时前
MySQL Workbench菜单汉化为中文
android·数据库·mysql