• Centos7安装Mysql8(官方整合包)


    1. 下载整合包

    [root@master ~]# wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.12-1.el7.x86_64.rpm-bundle.tar
    

    2. 解压整合包

    [root@master ~]# tar -xvf mysql-8.0.12-1.el7.x86_64.rpm-bundle.tar
    [root@master ~]# ls
    mysql-8.0.12-1.el7.x86_64.rpm-bundle.tar
    mysql-community-client-8.0.12-1.el7.x86_64.rpm
    mysql-community-common-8.0.12-1.el7.x86_64.rpm
    mysql-community-devel-8.0.12-1.el7.x86_64.rpm
    mysql-community-embedded-compat-8.0.12-1.el7.x86_64.rpm
    mysql-community-libs-8.0.12-1.el7.x86_64.rpm
    mysql-community-libs-compat-8.0.12-1.el7.x86_64.rpm
    mysql-community-minimal-debuginfo-8.0.12-1.el7.x86_64.rpm
    mysql-community-server-8.0.12-1.el7.x86_64.rpm
    mysql-community-server-minimal-8.0.12-1.el7.x86_64.rpm
    mysql-community-test-8.0.12-1.el7.x86_64.rpm
    

    注意:
    可以使用 rpm -pql 查看指定包生成的文件(路径)
    例如:rpm -pql mysql-community-client-8.0.12-1.el7.x86_64.rpm


    3. 安装依赖包

    [root@master ~]# yum install mysql-community-{client,common,libs}-**
    

    4. 安装服务端

    [root@master ~]# rpm -ivh mysql-community-server-8.0.12-1.el7.x86_64.rpm 
    

    5. 启动服务

    [root@master ~]# systemctl start mysqld
    [root@master ~]# systemctl enable mysqld
    

    6. 修改密码

    [root@master ~]# grep 'temporary password' /var/log/mysqld.log
    2019-04-15T02:32:09.005050Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: eWPEdEgj/5o:
    [root@master ~]# mysql -uroot -p'eWPEdEgj/5o:'
    mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
    

    注意
    要求密码包含至少一个大写字母,一个小写字母,一个数字和一个特殊字符,并且总密码长度至少为8个字符。

  • 相关阅读:
    Nginx配置文件详解
    ngrinder 负载均衡脚本开发
    spring boot过滤器FilterRegistrationBean
    Spring boot 拦截器和过滤器
    spring controller中默认转发、forward转发、redirect转发之间的区别
    @RestControllerAdvice作用及原理
    Android APK脱壳--腾讯乐固、360加固一键脱壳
    java 简单xor加密
    facebook 研究
    阿里云docker安装
  • 原文地址:https://www.cnblogs.com/liuhedong/p/10707191.html
Copyright © 2020-2023  润新知