美文网首页
安装 MYSQL 5.7

安装 MYSQL 5.7

作者: 小小小胡 | 来源:发表于2017-07-31 21:53 被阅读6次

    Centos

    wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
    yum localinstall -y mysql57-community-release-el7-7.noarch.rpm
    yum install -y mysql-community-server
    启动MySQL服务
    systemctl start mysqld.service
    grep 'temporary password' /var/log/mysqld.log 获取临时密码!

    use mysql;
    alter user 'root'@'localhost' identified by '#Chuqv9580';
    flush privileges;
    所有IP登录
    GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'your password' WITH GRANT OPTION;

    Ubuntu

    wget https://repo.mysql.com//mysql-apt-config_0.8.8-1_all.deb
    sudo dpkg -i mysql-apt-config_0.8.8-1_all.deb
    sudo apt-get update
    sudo apt-get install mysql-server

    在my.con [mysqld]的段中加上一句:
    skip-grant-tables
    免登录

    相关文章

      网友评论

          本文标题:安装 MYSQL 5.7

          本文链接:https://www.haomeiwen.com/subject/lfcdlxtx.html