参考文章
https://blog.csdn.net/wohiusdashi/article/details/89358071
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
cd /etc/yum.repos.d/
1、安装命令:
yum install mysql-server
2、启动msyql:
systemctl start mysqld #启动MySQL
3、获取安装时的临时密码(在第一次登录时就是用这个密码):
grep ‘temporary password‘ /var/log/mysqld.log
4、倘若没有获取临时密码,则
4.1、删除原来安装过的mysql残留的数据
rm -rf /var/lib/mysql
4.2.再启动mysql
systemctl start mysqld #启动MySQL
遇到的问题
解决方法
yum -y remove mariadb-libs
# yum install mysql-community-server