zoukankan      html  css  js  c++  java
  • CentOS6.5安装MySQL5.7(也适合其他版本安装)

     1、查看是否已经安装过mysql或其依赖,若已装过要先将其删除,否则第4步使用yum安装时会报错:

    方法一:yum list installed | grep mysql
    方法二:rpm -qa |grep mysql


    2、下载载mysql57-community-release-el6-5.noarch.rpm
    wget https://repo.mysql.com//mysql57-community-release-el5-8.noarch.rpm --no-check-certificate

    (下载站点:https://dev.mysql.com/downloads/repo/yum/)

    3、安装rpm文件
    yum install -y mysql57-community-release-el5-8.noarch.rpm
    安装完成后,可以在/etc/yum.repos.d中看到增加的文件

    4、查看mysql5.7是否启用
    yum repolist enabled | grep mysql

    5、安装mysql
    yum install mysql-community-server

    6、启动mysql服务,初始化
    service mysqld start

    7、查看密码登录并修改密码
    grep "password" /var/log/mysqld.log

    update mysql.user set authentication_string=password('wclwcw1101!') where user='root' and Host = 'localhost';

  • 相关阅读:
    bzoj1648:奶牛野餐
    bzoj1650:跳石子
    bzoj1643:贝西的秘密草坪
    bzoj1639:月度开支
    bzoj1636:Balanced Lineup
    bzoj1634:护花
    .
    bzoj1620:时间管理
    bzoj1611:流星雨
    bzoj1609:麻烦的聚餐
  • 原文地址:https://www.cnblogs.com/wclwcw/p/7221156.html
Copyright © 2011-2022 走看看