CentOS 6/7 安装 MySQL 8 最新版

约定不等于承诺〃 2022-05-11 12:14 320阅读 0赞

相关链接:

在 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:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# wget -V
  1. 如果没有安装wget,执行下列命令安装:
  2. [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install wget
  1. 下载MySQL 8 rmp源:
    MySQL rpm源:http://repo.mysql.com/
    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源:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# wget http://repo.mysql.com/mysql80-community-release-el7.rpm

    默认下载位置为用户当前所在位置。

  2. 安装 MySQL 8 rpm源:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y localinstall mysql80-community-release-el7.rpm
  3. 安装 MySQL 8 数据库:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# yum -y install mysql-community-server
  4. 启动MySQL数据库:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl start mysqld
  5. 开启MySQL的开机自启:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl enable mysqld
  6. 重新载入:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# systemctl daemon-reload
  7. 查看MySQL预设密码:
    使用命令(优先选择):

    1. [root@CSDNBlogs doc]# grep 'temporary password' /var/log/mysqld.log
    2. 2018-10-19T16:43:18.727456Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ZWHc%Wg7a!s6

    或者使用:

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# grep 'temporary password' /var/log/mysqld.log
    2. 2018-10-19T16:43:18.727456Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ZWHc%Wg7a!s6
  8. 登录MySQL数据库(密码在上一步可查看):

    1. [root@CentOS-x86-64-DVD-1804-Desktop ~]# mysql -u root -p
    2. Enter password:
    3. Welcome to the MySQL monitor. Commands end with ; or \g.
    4. Your MySQL connection id is 9
    5. Server version: 8.0.12
    6. Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    7. Oracle is a registered trademark of Oracle Corporation and/or its
    8. affiliates. Other names may be trademarks of their respective
    9. owners.
    10. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    11. mysql>
  9. 初次登录,修改数据库密码:

    1. mysql> ALTER user 'root'@'localhost' IDENTIFIED BY 'Aaa+Bbb-123';
    2. 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) 下载

发表评论

表情:
评论列表 (有 0 条评论,320人围观)

还没有评论,来说两句吧...

相关阅读

    相关 centos7 安装新版Nginx

    Nginx 是一个免费的、开源的、高性能的 HTTP 和反向代理服务,主要负责负载一些访问量比较大的站点。 Nginx 可以作为一个独立的 Web 服务,也可以用来给 Apa

    相关 centos7编译安装git新版

    假如系统已经安装了git,先删除。 如果是通过yum安装的,直接在终端使用以下指令删除: yum remove git 如果是通过源码编译安装的,参考以下文章: