1. 安装mysql5.6
    2. wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    3. rpm -ivh mysql-community-release-el7-5.noarch.rpm
    4. yum install mysql-server -y
    5. service mysqld start
    6. service mysqld status
    7. systemctl enable mysqld.service
    8. grep "password" /var/log/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysql/mysqld.log
    9. mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码
    10. 安装mysql5.7
    11. wget http://repo.mysql.com/mysql57-community-release-el7-11.noarch.rpm
    12. rpm -ivh mysql57-community-release-el7-11.noarch.rpm
    13. yum install mysql-server -y
    14. service mysqld start
    15. service mysqld status
    16. systemctl enable mysqld.service
    17. grep "password" /var/log/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysql/mysqld.log
    18. mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码
    19. 安装mysql8.0
    20. wget http://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
    21. rpm -ivh mysql80-community-release-el7-3.noarch.rpm
    22. yum install mysql-server -y
    23. service mysqld start
    24. service mysqld status
    25. systemctl enable mysqld.service
    26. grep "password" /var/log/mysql/mysqld.log找初始密码,如果报找不到文件那就试试grep "password" /var/log/mysqld.log
    27. mysqladmin -uroot -p password NewPassword回车输入初始密码来重置密码