美文网首页
Centos7安装MySQL8.0

Centos7安装MySQL8.0

作者: lenny611 | 来源:发表于2021-08-31 22:18 被阅读0次

    1.yum仓库下载MySQL
    yum localinstall https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
    2.yum安装MySQL
    yum install mysql-community-server
    3.启动MySQL
    service mysqld start

    image.png
    4.检查MySQL服务状态
    service mysqld status
    image.png
    5.初次登录,查看初始密码
    grep 'temporary password' /var/log/mysqld.log
    image.png
    6.使用第5步得到的密码登录
    mysql -uroot -p
    image.png
    7.修改密码
    alter user 'root'@'localhost' identified by '你的新密码'
    image.png
    8.通过IDEA连接使用即可(如果是阿里云等服务器,记得把mysql3306端口打开)。

    相关文章

      网友评论

          本文标题:Centos7安装MySQL8.0

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