This method of installation is very simple
Cd/usr/local
Download the installation package
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
Extract
TAR-ZXVF mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
[Email protected] local]# pwd
/usr/local
[[Email protected] local]# mv mysql-5.7.17-linux-glibc2.5-x86_64 MySQL
CD MySQL
Mkdir-p/data/mysql/data
Create a MySQL user
Useradd mysql-s/sbin/nologin-m (no home directory)
Chown-r Mysql.mysql/data/mysql
./bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql/data
Prompt for initial password:
2017-03-29T15:09:12.116410Z 1 [Note] A temporary password is generated for [email protected]: EW/WX (<z>43l
Copy the startup script file
CP Support-files/mysql.server/etc/init.d/mysqld
Set boot up
Chkconfig mysqld on
Chkconfig--list|grep mysqld
chmod 755/etc/init.d/mysqld
Configuring Environment variables
Echo ' path=/usr/local/mysql/bin/: $PATH ' >>/etc/profile
. /etc/profile
Go to MySQL:
Mysql-uroot-p EW/WX (<z>43l
Change Password
Alter user ' root ' @ ' localhost ' identified by ' 123456 ';
Flush privileges;
Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ';
FLUSH privileges;
CentOS mysql5.7 Binary Package installation