1. Download: wget http://repo.mysql.com/mysql57-community-release-el7-10.noarch.rpm
2. Install:
(1) yum -y install mysql57-community-release-el7-10.noarch.rpm
(2) 安装 server: yum -y install mysql-community-server
3. Start: systemctl start mysqld.service
4. Check the initial password: grep "password" /var/log/mysqld.log
5. Initial password: mysql -uroot -p
6. Change Password: ALTER USER 'root' @ 'localhost' IDENTIFIED BY; if the new password is too simple, there will be prompt, set a little more complicated like 'Kevin129!'
7. Modify remote access:
use mysql;
. GRANT ALL PRIVILEGES ON * * TO 'root' @ '%' IDENTIFIED BY 'Kevin129!' WITH GRANT OPTION; (remember the semicolon at the end of the band of English state)
8. Refresh permissions: flush privileges; (remember the semicolon at the end of the band of English state)
9. Set the boot from the start:
(1) we /etc/rc.local
(2) adding at the end: service mysqld start
7,8 If not, use Navicat and other visualization tools will be reported in 1045 when a remote connection (ban remote connections)