Upgrade, recommend restart after completion
Yum -y update
Uninstall the installed MySQL
Yum -y remove Mysql-libs
Installation dependencies
Yum Install Numactl-libs
Download the installation package
wgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-common-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-libs-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-libs-compat-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-client-5.7.19-1.el7.x86_64.rpmwgetHttps//cdn.mysql.com//downloads/mysql-5.7/mysql-community-server-5.7.19-1.el7.x86_64.rpm
Installation
RPM-IVH mysql-community-common-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-libs-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-libs-compat-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-client-5.7. +-1. el7.x86_64.rpm--nosignaturerpm-IVH mysql-community-server-5.7. +-1. el7.x86_64.rpm--nosignature
Start
Service mysqld Start
View initial Password
grep " Password " /var/log/mysqld.log
Change password immediately after logging in to MySQL
' Root '@'localhost' = PASSWORD ('newpass');
This may indicate that the password does not meet the requirements, enter the following statement and then re-modify the password
Set global validate_password_policy=0;
Set power-on self-boot
Chkconfig mysqld on
Modify MySQL Configuration
Vim/etc/my.cnf
Revision changed to
[Client]port=3306default-character-set=utf8mb4[mysqld]port=3306 character-set-client-handshake=0character_set_server=utf8mb4collation- server=utf8mb4_unicode_cidatadir=/var/lib/mysqlsocket=/var/lib/mysql/ Mysql.socksymbolic-links=0log-error=/var/log/mysqld.logpid-file =/var/run/mysqld/mysqld.pid
Installing Mysql5.7 under CentOS