- 下载mysql安装包
wget https://repo.mysql.com//mysql80-community-release-el8-1.noarch.rpm
- 挂载到本地yum
yum localinstall mysql80-community-release-el8-1.noarch.rpm
- 查看是否挂载成功
yum repolist enabled | grep "mysql.*-community.*"
- 安装community-server
yum install -y mysql-community-server
- 查看密码
grep 'temporary password' /var/log/mysqld.log
- 登陆修改密码
mysql -uroot -p '上一步获取的密码'
ALTER USER 'root'@'localhost' IDENTIFIED BY '1234';
FAQ安装问题解决
- OpenSSL 1.1.0f版遇到缺失 libssl.so.1.1问题
echo "/usr/local/lib64" >> /etc/ld.so.conf
ldconfig -v
- postfix-2.10.1-9.el7.x86_64 有缺少的需求 libmysqlclient.so.18()(64bit)
去官网下载安装即可(https://downloads.mysql.com/archives/community/)
wget https://downloads.mysql.com/archives/get/p/23/file/mysql-community-libs-8.0.25-1.el8.x86_64.rpm
yum localinstall mysql-community-libs-8.0.25-1.el8.x86_64.rpm
- ERROR 1819 (HY000): Your password does not satisfy the current policy requirements。
set global validate_password.policy=0;
set global validate_password.length=1;
参考文章
- https://www.jianshu.com/p/bcdd4789d6a6
- https://blog.csdn.net/hawk199/article/details/111554982
- https://www.cnblogs.com/rusking/p/10561432.html