Download and decompress MySQL database
wget http://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.4-m14-linux-glibc2.5-x86_64.tar.gz
TAR-XVF mysql-5.7.4-m14-linux-glibc2.5-x86_64.tar.gz-c/usr/local/mysql-5.7.4
2. Create MySQL users and modify the software permissions
Useradd-r-m-s/sbin/nologin MySQL
Chown-r mysql/usr/local/mysql-5.7.4
Chgrp-r mysql/usr/local/mysql-5.7.4
3. Installing and initializing the database
cd/usr/local/mysql-5.7.4/
scripts/mysql_install_db--user=mysql--basedir=/usr/local/mysql-5.7.4/--datadir=/usr/local/mysql-5.7.4/data/ --MySQL must be installed in the MySQL root directory, otherwise error
Cp-a. /support-files/my-default.cnf/etc/my.cnf
Cp-a. /support-files/mysql.server/etc/init.d/mysqld
CD bin/
./mysqld_safe--user=mysql &
Chkconfig--add MySQL
[Email protected] scripts]#/etc/init.d/mysqld restart
Shutting down MySQL. [OK]
Starting MySQL ... [OK]
[Email protected] scripts]#
This article from "Together Through the Days" blog, declined reprint!
Installing the Binary mysql-5.7 database