基于【CentOS-7+ Ambari 2.7.0 + HDP 3.0】搭建HAWQ数据仓库 —— MariaDB 安装配置

一、安装并使用MariaDB作为Ambari、Hive、Hue的存储数据库。

yum install mariadb-server mariadb

启动、查看状态,检查mariadb是否成功安装

systemctl start mariadb
systemctl status mariadb

二、配置mariadb

1,首先停止MariaDb 服务的运行 

systemctl stop mariadb

2,编辑/etc/my.cnf 在[mysqld]段下,添加如下几行行配置:

transaction-isolation = READ-COMMITTED
max_connections = 550
innodb_flush_method = O_DIRECT

保存退出后,配置mariadb服务开机启动,并重新启动MariaDB

systemctl enable mariadb
systemctl start mariadb

 

3,运行mariadb安全配置脚本/usr/bin/mysql_secure_installation ,root@localhost,密码这里设为hadoop

/usr/bin/mysql_secure_installation

****授权用户root使用密码passwd从任意主机连接*到mysql服务器

mysql -uroot -p
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '****' WITH GRANT OPTION;
flush privileges;

**** 安装MySQL JDBC Driver 连接 MariaDB

**** 下载、解压缩,复制mysql-connector-java-5.1.46-bin.jar到/usr/share/java/,并重命名:

wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
tar zxvf mysql-connector-java-5.1.46.tar.gz
cd mysql-connector-java-5.1.46/
cp mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar

 

posted @ 2018-08-14 11:40  柒零壹  阅读(1582)  评论(1编辑  收藏  举报