龙空技术网

5、MySQL安装

猿码笔记 1062

前言:

现时咱们对“mysql查看临时密码”可能比较注重,咱们都想要了解一些“mysql查看临时密码”的相关文章。那么小编在网络上网罗了一些有关“mysql查看临时密码””的相关内容,希望兄弟们能喜欢,朋友们一起来了解一下吧!

1、上传安装包并解压:tar -xvf mysql-5.7.19-1.el7.x86_64.rpm-bundle.tar

删除自带的MySQL安装文件:yum remove mysql-libs;

依次安装rpm包,顺序不可变。

rpm -ivh mysql-community-common-5.7.19-1.el7.x86_64.rpm;

rpm -ivh mysql-community-libs-5.7.19-1.el7.x86_64.rpm;

rpm -ivh mysql-community-client-5.7.19-1.el7.x86_64.rpm;

rpm -ivh mysql-community-server-5.7.19-1.el7.x86_64.rpm;

rpm -ivh mysql-community-devel-5.7.19-1.el7.x86_64.rpm;

启动MySQL:service mysqld start;或者:systemctl start mysqld.service;

查看mysql临时密码:cat /var/log/mysqld.log | grep password

登录数据库修改root用户密码:alter user 'root'@'localhost' identified by 'Hnyztcl_1';

创建hive数据库:

create database hive;

创建一个新用户:

create user 'hiveuser'@'%' identified by 'Hnyztcl_1';

给该用户授权:

grant all on hive.* TO 'hiveuser'@'%';

grant all on hive.* TO 'hiveuser'@'localhost' identified by 'Hnyztcl_1';

标签: #mysql查看临时密码 #mysql bundle安装