Mysql系列——数据库运维(1)——数据库版本介绍及安装-yum
来源:互联网 发布:淘宝网无法正常显示 编辑:程序博客网 时间:2024/06/05 20:54
配置yum源
- 此处主要是为了安装其他软件方便,mysql有自己的noarch。
安装base repo源
`
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.bak
`
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
安装epel repo源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
清理缓存
yum clean all
重新生成缓存
yum makecache
测试安装wget
yum search wget
yum remove wget
yum -y install wget
安装mysql源
安装noarch
- 打开网址 http://repo.mysql.com/ 查找最近时间的mysql57的源地址
wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm #注意查找mysql57*-el7-noarch.rpm的文件
yum install mysql57-*.rpm
安装mysql
·
yum install mysql-server
·
- 注意,如果上面的命令不能安装mysql,那么需要删除上述noarch包,rpm -qa | grep mysql 查找mysql57*.noarch包名,或者直接运行命令yum remove mysql57*.noarch删除。
启动服务
systemctl start mysqld.service
查看mysql服务状态
systemctl is-active mysqld.service \# systemctl status mysqld.service 也可以
查看是否开机启动
systemctl is-enabled mysqld.service
设置密码
修改配置文件,设置跳过登录密码选项
vi /etc/my.cnf
- 加入 skip-grant-tables ,wq 保存。
重启服务
systemctl restart mysqld.service
登录修改密码 `
mysql -uroot
Mysql>use mysql;
Mysql>update user set authentication_string=password(‘123456’) where user=’root’;
\#各个版本中保存密码的字段不同,可以用desc user;命令查看user表定义,有的版本是password字段。
Mysql>flush privileges;
Mysql>exit;
重启服务生效
systemctl restart mysqld.service
数据库运维安装部分完毕,谢谢您。
- Mysql系列——数据库运维(1)——数据库版本介绍及安装-yum
- Mysql系列——数据库运维(1)——数据库版本介绍及安装-bin
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法
- linux 安装mysql数据库——yum安装法2
- yum安装MySQL数据库
- yum命令安装mysql数据库
- Centos6.4下Yum命令安装Mysql数据库及配置
- linux下Yum命令安装Mysql数据库及配置
- Centos6.4下Yum命令安装Mysql数据库及配置
- Hive资料整理系列 二 Hive安装及mysql做元数据库 --clouder版本
- Mysql系列——数据库设计(1)——关系型数据库使用情景
- 数据库集群系列 — MySQL NDB
- Codeforce The Eternal Immortality
- java实现数据结构中线性表的顺序存储
- Python箱型图处理离群点
- 单链表的运用——多项式及其运算
- webpack 生产模式基础配置
- Mysql系列——数据库运维(1)——数据库版本介绍及安装-yum
- Qt 学习之路 2(78):QML 基本元素
- 凸包问题的回溯操作
- char str1[]="abc"; char str2[]="abc";str1与str2不相等,为什么
- Printf格式输出详解
- 四脚猫php视频下载 检测一个网页上的链接是否都可访问(练一练)
- ubuntu安装pip
- java生成指定范围的随机数
- 【JavaMailWeb】用户注册通过邮箱激活案例