美文网首页
CentOS7安装MySQL5.7

CentOS7安装MySQL5.7

作者: 老A想猪猪 | 来源:发表于2019-03-16 18:43 被阅读0次
安装mysql源:

yum -y localinstall http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm

安装mysql-5.7:

yum -y install mysql-community-server mysql-community-devel

启动mysql:
systemctl start mysqld
systemctl enable mysqld
查看mysql的随机密码:

grep 'temporary password' /var/log/mysqld.log

进入mysql更改密码:

mysql -uroot -p'eZa?x2q;&;l%'

#密码设置为redhat
set global validate_password_policy=0;
set global validate_password_length=1;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'redhat';

相关文章

网友评论

      本文标题:CentOS7安装MySQL5.7

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