Hadoop组件搭建-Mysql

Mysql数据库的安装

检查是否有冲突包

rpm -qa | grep mariadb

卸载

rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64

安装

rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm

rpm -ivh mysql-community-libs-5.7.18-1.el7.x86_64.rpm

rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm

rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm --force --nodeps

启动mysql服务

service mysld start

查看初始密码

grep “password” /var/log/mysqld.log

修改密码

use mysql

set password =password(‘admin’);

打开远程访问(在之后的Hive、Sqoop中会用到)

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘admin’;

flush privileges;

上一篇:linux系统 MYSQL的安装


下一篇:Linux安装MySQL