yum -y install mysql-server
启动mysql数据库
service mysqld start
初始化mysql数据库(默认root的密码为空,按提示一步步完成)
/usr/bin/mysql_secure_installation
将mysql加入开机启动
chkconfig mysqld on
允许远程登录mysql
首先登录mysql数据,然后执行下面两行语句:GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'hadoop' WITH GRANT OPTION;flush privileges;
ok ,安装完成