Install MySQL - PandaTofu/How-to-configure-ali-ESC GitHub Wiki
Reference link: https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html
1. Download and install the release package
wget https://dev.mysql.com/get/mysql80-community-release-el7-2.noarch.rpm
yum install -y mysql80-community-release-el7-2.noarch.rpm
2. Install MySQL server
yum install -y mysql-community-server
3. Start MySQL service
service mysqld start
4. Connect to MySQL and update password
-
Get the initial root password
grep 'temporary password' /var/log/mysqld.log -
Connect to MySQL and change the root password
mysql -uroot -pALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';