码迷,mamicode.com
首页 > 数据库 > 详细

安装配置MySQL

时间:2017-06-21 21:10:20      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:安装配置   password   服务   set   tar   ase   yum   star   moni   

安装
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;

安装配置MySQL

标签:安装配置   password   服务   set   tar   ase   yum   star   moni   

原文地址:http://www.cnblogs.com/yaoyiyao/p/7061382.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!