zoukankan      html  css  js  c++  java
  • Red Hat 7.2 RPM安装Mysql 5.7.12

    安装Red Hat  7.2  开发包Java包全部安装

    下载Mysql  5.7.12

    wget  http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar

    查看是否安装了MySQL

    rpm -qa | grep mysql 

    卸载mysql
    rpm -e –nodeps 

    解压mysql 
    tar -xvf mysql-5.7.12-1.el7.x86_64.rpm-bundle.tar

    安装mysql 
    yum install mysql-community-{client,common,libs}-*  

    rpm -ivh mysql-community-server-5.7.12-1.el7.x86_64.rpm 

    启动Mysql服务

    先用常规的启动方法 service mysqld start

    z在使用最新启动方法 systemctl start mysqld.service

    查看MySQL服务器的状态

    sudo service mysqld status

    生成随机密码
    grep 'temporary password' /var/log/mysqld.log
    2016-04-30T11:25:13.632616Z 1 [Note] A temporary password is generated for root@localhost: X9.L=p4iylZD


    配置随机密码
    mysql -uroot -p
    X9.L=p4iylZD

    ALTER USER 'root'@'localhost' IDENTIFIED BY 'HanZheng.123';

    5.7中存储密码的字段不再是password了,变成了authentication_string

    update mysql.user set authentication_string=password('root') where user='root'';

    修改root密码后如果第一次使用root用户登入mysql系统还会需要重置一次root密码

    SET PASSWORD=PASSWORD('root');



    重新登陆
    mysql -uroot -p
    HanZheng.123

  • 相关阅读:
    react生命周期-渲染阶段
    react声明周期详解
    react子传父
    react 爷爷组件件传递给孙子组件
    react验证参数格式类型
    原生input上传视拼,参数形式 file: (binary)形式的
    L2-4 彩虹瓶 (25分)
    L2-3 深入虎穴 (25分)
    L2-1 链表去重 (25分)
    L1-1 帅到没朋友 (20分)
  • 原文地址:https://www.cnblogs.com/exmyth/p/9141620.html
Copyright © 2011-2022 走看看