hadoopmysql安装

Posted 鲸落……

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoopmysql安装相关的知识,希望对你有一定的参考价值。

1、下载软件包:mysql-8.0.15-1.el7.x86_64.rpm-bundle.tar和mysql-connector-java-8.0.15.zip文件。

2、将软件包通过moba上传到linux系统。/usr/local/soft/

3、解压软件包

tar -xvf mysql-8.0.15-1.el7.x86_64.rpm-bundle.tar

 


4、卸载系统自带mariadb

rpm -qa | grep mariadb

yum -y remoe mariadb-libs-5.5.52-1.el7.x86_64v

5、下载依赖包

yum -y install openssl-devel perl-JSON

yum install -y libaio.x86_64 libaio-devel.x86_64

yum install -y openssl-devel.x86_64 openssl.x86_64

yum install -y perl.x86_64 perl-devel.x86_64

yum install -y perl-JSON.noarch

yum install -y autoconf

yum install net-tools -y

6、顺序安装mysql

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

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

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

rpm -ivh mysql-community-server-8.0.15-1.el7.x86_64.rpm

rpm -ivh mysql-community-devel-8.0.15-1.el7.x86_64.rpm

安装完默认是mysql用户、用户组和权限

chown -R mysql:mysql /var/lib/mysql/

7、重启mysql服务

systemctl restart mysqld.service

systemctl status mysqld.service

若启动失败查看:

tail -n 100 /var/log/mysqld.log

8、查看密码

cat /var/log/mysqld.log | grep password

cd /var/log/

cat mysqld.log

9、数据库登陆

mysql -u root -p

输入第八步中的密码进行登陆

10、设置登陆密码复杂度

set global validate_password.length=4;

set global validate_password.policy=0;

SHOW VARIABLES LIKE 'validate_password%'; 

11、修改密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'root123';

flush privileges;

12、开放所有IP都能访问

use mysql;

select host, user, authentication_string, plugin from user;

CREATE USER 'root'@'%' IDENTIFIED BY 'root123';

grant all privileges ON *.* to 'root'@'%' with grant option;

flush privileges;

13、修改加密方式

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root123';

select host, user, authentication_string, plugin from user;

14、重启数据库

quit

/bin/systemctl restart mysqld.service

或:systemctl start mysqld

设置开机自启动

systemctl enable mysqld.service

15、远程navicat连接测试

创建名字为hive的数据库

 

以上是关于hadoopmysql安装的主要内容,如果未能解决你的问题,请参考以下文章

MySQL免安装版与安装版区别

windows怎么安装mysql

mysql如何安装

mysql安装教程 教程指导在这

电脑如何安装mysql

MySQL 5.7怎样安装