一看必会系列:MYSQL5.7 官方YUM安装

No Comments mysql_mariadb

 

安装官方源
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

开启5.7版本原
yum-config-manager –enable mysql57-community

关闭8.0版本源
yum-config-manager –disable mysql80-community

安装mysql-server

yum install mysql-community-server

------中间广告---------

启动
systemctl start mysqld
systemctl enable mysqld

查看密码

grep ‘temporary password’ /var/log/mysqld.log

 

进入密码 mysql –u root –p

 

修改密码

  • mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MPass122!';

发表评论