安装mysql5.6
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-server -y
service mysqld start
service mysqld status
systemctl enable mysqld.service
grep "password" /var/log/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysql/mysqld.log
mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码
安装mysql5.7
wget http://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
yum install mysql-server -y
service mysqld start
service mysqld status
systemctl enable mysqld.service
grep "password" /var/log/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysql/mysqld.log
mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码
安装mysql8.0
wget http://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
rpm -ivh mysql80-community-release-el7-3.noarch.rpm
yum install mysql-server -y
service mysqld start
service mysqld status
systemctl enable mysqld.service
grep "password" /var/log/mysql/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysqld.log
mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码