1 Download MySQL
Https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz
I downloaded MySQL 5.6.
2. Unzip it and move it to the corresponding directory
TAR-ZXVF mysql-5.6.37-linux-glibc2.12-x86_64.tar.gz
CP./mysql-5.6.37-linux-glibc2.12-x86_64/usr/local/mysql
Create users and Groups
Groupadd MySQL and Useradd-r-G MySQL mysq
Enter the source directory
Cd/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64
Create data directory to hold MySQL
mkdir data
Modify directories for users and groups
Chown-r Mysql:mysql.
Copy this file into the INIT.D directory
Join the power-on self-starter
CP Support-files/mysql.server/etc/init.d/mysqld
Vi/etc/init.d/mysqld
Basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64
Datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data
Initialize MySQL
./scripts/mysql_install_db--use=mysql--basedir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64
--datadir=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/data
--defaults-file=/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/my.cnf
Join the power-on self-starter
Chkconfig--add mysqld
Chkconfig--list mysqld
Start the MySQL service
Service mysqld Start
To see if it started successfully
Netstat-anp|grep mysqld
Go to MySQL
./bin/mysql-u Root
/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin-u root password ' new-password '
/usr/local/mysql/mysql-5.6.37-linux-glibc2.12-x86_64/bin/mysqladmin-u root-h skinglzw password ' new-password '
CentOS install MySQL 5.6 binary package installation