1. Extracting files
[Email protected] ~]# TAR-ZXVF mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz-c/usr/local/
2. renaming
[Email protected] ~]# cd/usr/local/
[Email protected] local]# MV Mysql-5.7.19-linux-glibc2.12-x86_64/mysql
3. Configure Environment variables
[Email protected] local]# VI +/etc/profile
[Email protected] local]# Source/etc/profile
4. Create groups and users and authorize
[[email protected] local]# Groupadd MySQL
[[email protected] local]# useradd-r-g mysql-s/bin/false MySQL
[Email protected] local]# chown-r MySQL mysql/
[Email protected] local]# chgrp-r MySQL mysql/
5. Initialize and remember the last 12-bit password
[Email protected] local]#/usr/local/mysql/bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql/-- datadir=/usr/local/mysql/data/--lc_messages_dir=/usr/local/mysql/share--LC_MESSAGES=ZH_CN
6. Modify the Mysql.server. File and copy it to the/etc/init.d/directory
[Email protected] local]# cd/usr/local/mysql/support-files/
[Email protected]centos3 support-files]# VI mysql.server
[email protected] support-files]# CP mysql.server/etc/init.d/mysqld
7. Renaming my.cnf
[Email protected] support-files]# MV/ETC/MY.CNF/ETC/MY_DEFAULT.CNF
8. Set Boot up
[Email protected] support-files]# chmod +x/etc/init.d/mysqld
[Email protected] support-files]# chkconfig--add mysqld
[Email protected] support-files]# chkconfig mysqld on
See if the boot is successful
[Email protected] support-files]# chkconfig--list mysqld
9. Start the service
[[email protected] support-files]#/etc/init.d/mysqld start
[[Email protected] support-files]# service MySQL start
10. Login to change the password, the password is the 5th step system generated
[Email protected] support-files]# mysql-uroot-p
Mysql> set Password=password ("1234");
Linux CentOS7 Installation Mysql5.7.19