美文网首页杂记闲谈
centos7安装MySQL8

centos7安装MySQL8

作者: 金哲一 | 来源:发表于2021-04-25 17:15 被阅读0次

    Step1 确认系统中是否安装了mysql
    mysql -V
    Step 2 下载mysql的repo源
    1)去mysql官网:https://dev.mysql.com/downloads/repo/yum/,找到对应mysql版本:

    2)得到repo源地址后使用wget进行下载:

    wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

    yum localinstall mysql80-community-release-el7-3.noarch.rpm

    yum install -y mariadb-server

    systemctl start mysqld

    查看密码
    cat /var/log/mysqld.log | grep password

    mysql -uroot -p

    alter user 'root'@'localhost' identified by 'Root@8888';

    use mysql

    允许远程链接
    update user set host='%' where user='root';

    flush privileges;

    相关文章

      网友评论

        本文标题:centos7安装MySQL8

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