安装Mysql
$ su - root
# yum -y install mysql mysql-server mysql-devel
# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
# rpm -ivh mysql-community-release-el7-5.noarch.rpm
# yum -y install mysql-community-server
配置Mysql
** 开启Mysql服务
# systemctl start mysqld.service
** 设置root用户密码
# mysqladmin -uroot password '123456'
** 为用户以及其他机器节点授权
mysql> grant all on *.* to root@'hadoop01' identified by '123456';
grant:授权
all:所有权限
*.*:数据库名称.表名称
root:操作mysql的用户
@'':主机名
密码:123456