centos安装mysql

来源:互联网 发布:淘宝客seo 编辑:程序博客网 时间:2024/06/03 16:55

1、使用yum安装mysql server。

yum install -y mysql-server

service mysqld start

chkconfig mysqld on

2、使用yum安装mysql connector

yum install -y mysql-connector-java

3、将mysql connector拷贝到hive的lib包中

cp/usr/share/java/mysql-connector-java-5.1.17.jar /usr/local/hive/lib

4、在mysql上创建hive元数据库,创建hive账号,并进行授权

create database if not existshive_metadata;

grant all privileges onhive_metadata.* to 'hive'@'%' identified by 'hive';

grant all privileges onhive_metadata.* to 'hive'@'localhost' identified by 'hive';

grant all privileges onhive_metadata.* to 'hive'@'spark1' identified by 'hive';

flush privileges;

use hive_metadata;

0 0
原创粉丝点击