安装配置MySQL

安装
yum install mysql-server
设置开机启动
chkconfig mysqld on
启动mysql服务器
service mysqld start

设置root的初试密码
mysqladmin -u root password '123456'


#为hive建库hive
create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
#activity monitor
create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
#为oozie建库oozie
create database oozie DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
#为hue建库hue
create database hue DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
设置root授权访问以上所有的数据库:
#授权root用户在主节点拥有所有数据库的访问权限
grant all privileges on *.* to 'root'@'n1' identified by '123456'  with grant option;

flush privileges;

posted @ 2017-06-21 19:35  YaoYiYao  阅读(137)  评论(0编辑  收藏  举报