centos7安装mysql
2017-07-16 23:21
351 查看
1)安装依赖
yum search libaio #
检索相关信息
yum install libaio #
安装依赖包
2)检查 MySQL
是否已安装
yum list installed | grep mysql
如果有,就先全部卸载,命令如下:
yum -y remove mysql-libs.x86_64
3)下载 MySQL Yum Repository(yum仓库)
地址为 http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
执行下载
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
如果提示-bash: wget:
未找到命令,请先执行 yum install wget
安装 wget
安装
4)如果没有wget下载对应的安装包
wget --->yum -y install wget
5)添加 MySQL Yum Repository
添加 MySQL Yum Repository
到你的系统 repository
列表中,执行
yum localinstall mysql-community-release-el7-5.noarch.rpm
6)验证下是否添加成功
yum repolist enabled | grep "mysql.*-community.*"
7)开始yum安装mysql
yum install mysql-community-server
8)开启
systemctl start mysqld
systemctl status mysqld
查看状态
9)验证 mysql
10)创建hive需要的数据库
在mysql上创建hive元数据库,并对hive进行授权
create database if not exists hive_metadata;
grant all privileges on hive_metadata.* to 'hive'@'%' identified by 'hive';
grant all privileges on hive_metadata.* to 'hive'@'localhost' identified by 'hive';
grant all privileges on hive_metadata.* to 'hive'@'s201' identified by 'hive';
flush privileges;
use hive_metadata;
yum search libaio #
检索相关信息
yum install libaio #
安装依赖包
2)检查 MySQL
是否已安装
yum list installed | grep mysql
如果有,就先全部卸载,命令如下:
yum -y remove mysql-libs.x86_64
3)下载 MySQL Yum Repository(yum仓库)
地址为 http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
执行下载
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
如果提示-bash: wget:
未找到命令,请先执行 yum install wget
安装 wget
安装
4)如果没有wget下载对应的安装包
wget --->yum -y install wget
5)添加 MySQL Yum Repository
添加 MySQL Yum Repository
到你的系统 repository
列表中,执行
yum localinstall mysql-community-release-el7-5.noarch.rpm
6)验证下是否添加成功
yum repolist enabled | grep "mysql.*-community.*"
7)开始yum安装mysql
yum install mysql-community-server
8)开启
systemctl start mysqld
systemctl status mysqld
查看状态
9)验证 mysql
10)创建hive需要的数据库
在mysql上创建hive元数据库,并对hive进行授权
create database if not exists hive_metadata;
grant all privileges on hive_metadata.* to 'hive'@'%' identified by 'hive';
grant all privileges on hive_metadata.* to 'hive'@'localhost' identified by 'hive';
grant all privileges on hive_metadata.* to 'hive'@'s201' identified by 'hive';
flush privileges;
use hive_metadata;
相关文章推荐
- centos7系统下完美安装mysql5.6
- centos7安装mysql5.6
- Centos7-安装MySQL
- CentOS7安装mysql5.6
- 【环境部署】centos7安装mysql-5.7.19 group-replication
- centos7安装配置mysql5.7
- 在CentOS7中利用yum命令安装mysql
- CentOS7安装MySQL冲突和问题解决小结
- CentOS7安装MySQL
- Centos7安装mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar
- Centos7安装Mysql
- CentOS7安装mysql提示“No package mysql-server available
- CentOS7 yum安装MySQL
- Centos7安装mysql-5.6.22-linux-glibc2.5-x86_64.tar.gz
- CentOS7 安装mysql
- CentOS7 安装mysql
- centos7安装mysql和mysql-connector-c++
- centos7编译安装mysql之2
- CentOS7 安装mysql
- centos7 install 安装mysql