CentOS 6/7 安装 MySQL 8 最新版

相关链接:

在 CentOS 1804 中 使用 yum 安装 MySQL 5.7 最新版

在 CentOS 1804 中 安装 MySQL 5.7.20 (或任意MySQL版本)

在 CentOS 1804 中 修改 MySQL 密码策略

在 CentOS 中 开启 MySQL 的 3306 端口

在不打开 MySQL 3306 端口的情况下,使用 Navicat 进项远程连接(使用22端口)

在 Ubuntu 中安装 MySQL5.7.20(任意版本)

在 Ubuntu 中安装 MySQL5.7.** 最新版

CentOS 6/7 安装 MySQL 8 最新版

CentOS 6/7 安装 MySQL 8.0.11 (或任意版)

MySQL 5.7 最新版 使用 yum 安装 MySQL NDB Cluster 7.5 最新版 集群

MySQL 集群 MySQL NDB Cluster 7.5.** 与 MySQL 5.7.** 对应版本说明

MySQL 集群 MySQL NDB Cluster 7.6.** 与 MySQL 5.7.** 对应版本说明

MySQL 5.7.20 (或指定版本) 与 MySQL NDB Cluster 7.6.4 (或指定版本) 集群

Windows 安装 MySQL 5.7.20 教程(及常见问题解决)

MySQL 5.7.20 (或任意版本) 的 Windows 版 安装程序 (msi) 下载


  1. 检查是否安装了wget:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# wget -V

    如果没有安装wget,执行下列命令安装:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install wget
  2. 下载MySQL 8 rmp源:
    MySQL rpm源:Index of /232905
    MySQL 8 适用于 CentOS 6 rpm源:http://repo.mysql.com/mysql80-community-release-el6.rpm
    MySQL 8 适用于 CentOS 7 rpm源:http://repo.mysql.com/mysql80-community-release-el7.rpm
    本文以 CentOS 7 为例安装 MySQL 8:
    下载 MySQL 8 rpm源:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# wget http://repo.mysql.com/mysql80-community-release-el7.rpm
    默认下载位置为用户当前所在位置。
     
  3. 安装 MySQL 8 rpm源:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y localinstall mysql80-community-release-el7.rpm
  4. 安装 MySQL 8 数据库:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install mysql-community-server
  5. 启动MySQL数据库:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start mysqld
  6. 开启MySQL的开机自启:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl enable mysqld
  7. 重新载入:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl daemon-reload
  8. 查看MySQL预设密码:
    使用命令(优先选择):
    [root@CSDNBlogs doc]# grep 'temporary password' /var/log/mysqld.log
    2018-10-19T16:43:18.727456Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ZWHc%Wg7a!s6
    或者使用:
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# grep 'temporary password' /var/log/mysqld.log
    2018-10-19T16:43:18.727456Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ZWHc%Wg7a!s6
  9. 登录MySQL数据库(密码在上一步可查看):
    [root@CentOS-x86-64-DVD-1804-Desktop ~]# mysql -u root -p 
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 9
    Server version: 8.0.12
    
    Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    mysql> 
    
  10. 初次登录,修改数据库密码:
    mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'Aaa+Bbb-123';
    Query OK, 0 rows affected (0.02 sec)
    

相关链接:

在 CentOS 1804 中 使用 yum 安装 MySQL 5.7 最新版

在 CentOS 1804 中 安装 MySQL 5.7.20 (或任意MySQL版本)

在 CentOS 1804 中 修改 MySQL 密码策略

在 CentOS 中 开启 MySQL 的 3306 端口

在不打开 MySQL 3306 端口的情况下,使用 Navicat 进项远程连接(使用22端口)

在 Ubuntu 中安装 MySQL5.7.20(任意版本)

在 Ubuntu 中安装 MySQL5.7.** 最新版

CentOS 6/7 安装 MySQL 8 最新版

CentOS 6/7 安装 MySQL 8.0.11 (或任意版)

MySQL 5.7 最新版 使用 yum 安装 MySQL NDB Cluster 7.5 最新版 集群

MySQL 集群 MySQL NDB Cluster 7.5.** 与 MySQL 5.7.** 对应版本说明

MySQL 集群 MySQL NDB Cluster 7.6.** 与 MySQL 5.7.** 对应版本说明

MySQL 5.7.20 (或指定版本) 与 MySQL NDB Cluster 7.6.4 (或指定版本) 集群

Windows 安装 MySQL 5.7.20 教程(及常见问题解决)

MySQL 5.7.20 (或任意版本) 的 Windows 版 安装程序 (msi) 下载

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

徐晓伟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值