Install 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 to find the initial password, if you can’t find the file, try grep "password" /var/log/mysql/mysqld.log
mysqladmin -uroot -p password NewPassword Enter the initial password to reset the password
Install 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 to find the initial password, if you can’t find the file, try grep "password" /var/log/mysql/mysqld.log
mysqladmin -uroot -p password NewPassword Enter the initial password to reset the password
Install 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 to find the initial password, if the file is not found, try grep "password" /var/log/mysqld.log
mysqladmin -uroot -p password NewPassword Enter the initial password to reset the password
In order to download faster, you can replace the URL with the Tencent source address
The specific address needs to open the following URL to find the precise URL
http://mirrors.tencent.com/mysql/yum/
If the server is Tencent Cloud, you can replace the public domain name with the intranet domain name, which is faster
Recommended Posts