Linux 通过yum安装 MySQL 8.0

1 在mysql官网下载mysql安装连接
Linux 通过yum安装 MySQL 8.0_第1张图片
2 命令: wget https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm
3 报 -bash: wget: 未找到命令
4 安装wget yum install wget
5 报:“Could not resolve host: mirrorlist.centos.org; 未知的错误”
6 命令 vi /etc/resolv.conf
7 添加:nameserver 202.106.0.20
search localdomain
8 在安装wget yum install wget
9 rpm -ivh mysql-community-server-8.0.15-1.el7.x86_64.rpm
10 rpm -Uvh mysql80-community-release-el7-2.noarch.rpm
11 yum install mysql-community-server
12 启动数据库: systemctl start mysqld
查看数据库状态:systemctl status mysqld

13 命令: grep ‘temporary password’ /var/log/mysqld.log
Linux 通过yum安装 MySQL 8.0_第2张图片
14 登陆root用户:mysql -uroot -p
15 设置密码 ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘P@ssw0rd’;

你可能感兴趣的:(大数据)