CentOS 7 Installation MySQL
Reference documents
- Https://www.ytyzx.org/index.php/%E5%A6%82%E4%BD%95%E5%9C%A8CentOS7%E4%B8%AD%E5%AE%89%E8%A3%85MySQL
Add Yum repository to CentOS 7
Enter "https://dev.mysql.com/downloads/repo/yum/" in the browser
Find the corresponding version on the page
CentOS 7 corresponds to theRed Hat Enterprise Linux 7 / Oracle Linux 7 (Architecture Independent), RPM Package
If you can't find it, you can use it directly
wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
Installing the Yum source rpm
rpm -ivh mysql57-community-release-el7-11.noarch.rpm
Install MySQL
yum install mysql-server
Encountering prompt inputY
Input systemctl start mysqld
to start MySQL service
Enter systemctl status mysqld
to view MySQL service status
MySQL Default boot boot
Input systemctl disable mysqld
to disable boot start
Input systemctl enable mysqld
to set boot boot
Enter grep ‘temporary password‘ /var/log/mysqld.log
to view the root user temporary password
Modify Password Policyset global validate_password_policy=0;
ALTER USER ‘root‘ IDENTIFIED BY ‘mypassword‘;
CentOS 7 Installation MySQL