在https://dev.mysql.com/downloads/repo/yum/ 找到合适的rpm
rpm Uvh mysql57-community-release-el6-8.noarch.rpm
ls -1 /etc/yum.repos.d/mysql-community*
yum repolist all | grep mysql
vim /etc/yum.repos.d/mysql-community.repo
修改mysql5.7如下
[mysql57-community]
name=MySQL 5.7 Community Server
#baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
yum install mysql-community-server
找到临时密码
grep 'temporary password' /var/log/mysqld.log
pzy9apVdT2-U
mysql -uroot -ppzy9apVdT2-U
set global validate_password_policy=0;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
flush privileges;
本博客文章绝大多数为原创,少量为转载,代码经过测试验证,如果有疑问直接留言或者私信我。
创作文章不容易,转载文章必须注明文章出处;如果这篇文章对您有帮助,点击右侧打赏,支持一下吧。
创作文章不容易,转载文章必须注明文章出处;如果这篇文章对您有帮助,点击右侧打赏,支持一下吧。