Installing the MySQL Database
A) Download MySQL source installation package: Wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
b) Install MySQL Source: Yum Localinstall mysql57-community-release-el7-8.noarch.rpm
If complete! appears at the end, the MySQL source installation is complete
c) Check whether the installation is complete: Yum Repolist enabled | grep "MySQL. -community."
d) Installing Mysql:yum install Mysql-community-server
If complete! appears at the end, MySQL installation is complete
e) set start MySQL service: Systemctl enable mysqld
f) View the installed MySQL version: Rpm-aq | Grep-i MySQL
g) Start MySQL service: systemctl restart Mysqld
h) View MySQL initial password: grep ' A temporary password '/var/log/mysqld.log
i) change the MySQL password: mysqladmin-u root-p ' old password ' password ' new password '
There is a problem changing the password here, the change failed because the password is too simple. There are two answer solutions:
Method One: Set the password to a complex point (this is the most straightforward method)
Method Two: Turn off MySQL password strength verification (Validate_password)
Edit Config file: vim/etc/my.cnf, add this line Validate_password=off
Restart MySQL service after editing: Systemctl restart Mysqld
j) Set MySQL to be able to access remotely:
Login into mysql:mysql-uroot-p password
Add one user to grant access: Grant all privileges the ' root ' @ ' IP address ' identified by ' password ' with GRANT option; You can change the IP to a percent of
Linux CentOS Installation Configuration MySQL5.7 database