zoukankan      html  css  js  c++  java
  • CentOS7的mysql5.7-rpm.bundle方式安装

    下载地址

    https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

    查询mariadb的版本号

    rpm -qa|grep mariadb

    如显示出:mariadb-libs-5.5.56-2.el7.x86_64,则说明系统使用的是该版本,可以对该版本进行卸载

    卸载mariadb

    sudo rpm -e mariadb-libs-5.5.56-2.el7.x86_64 --nodeps

    解压mysql

    tar xvf  mysql-5.7.19-1.el6.x86_64.rpm-bundle.tar

    安装mysql

    建议按顺序安装:common --> libs --> clients --> server

    rpm -ivh mysql-community-libs-compat-5.7.19-1.el6.x86_64.rpm --nodeps
    rpm -ivh mysql-community-common-5.7.19-1.el6.x86_64.rpm --nodeps
    rpm -ivh mysql-community-libs-5.7.19-1.el6.x86_64.rpm --nodeps
    rpm -ivh mysql-community-client-5.7.19-1.el6.x86_64.rpm --nodeps
    rpm -ivh mysql-community-server-5.7.19-1.el6.x86_64.rpm --nodeps

    # 查看mysql安装到哪里了
    which mysqld

    关闭防火墙

    setenforce 0
    systemctl stop firewalld.service 
    systemctl disable firewalld.service

    启动mysql

    service mysqld start

    查看root初始密码

    more /var/log/mysqld.log |grep password 

    [Note] A temporary password is generated for root@localhost: OgoSH?xjg1hb

    登录

    mysql -uroot -p

    修改密码规则以及修改密码

    mysql>set global validate_password_length=4;
    mysql>set global validate_password_policy=0;
    mysql>set password = password('root');

    给任意IP授权

    mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
    mysql>FLUSH PRIVILEGES;
  • 相关阅读:
    SpreadJS V13.0发布,聚焦表单设计与数据交互,让您的工作效率突飞猛进!
    springboot---redis缓存的使用
    springboot logback日志的使用
    Https与Http的区别以及Https的解说
    maven的使用解说
    Spring SpringMVC myBatis(简称SSM)理解
    抽象类与接口的区别
    Hadoop综合大作业
    hive基本操作与应用
    熟悉HBase基本操作
  • 原文地址:https://www.cnblogs.com/maobuji/p/11684040.html
Copyright © 2011-2022 走看看