1. Download and decompress MySQL database wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-linux-glibc2.5-x86_64. TAR.GZS TAR-XVF mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz-c/usr/local/mysql-5.7.9 2. Creating a soft link ln-s mysql-5.7.9 mysql 3. Permissions to create MySQL users and modify software useradd-r-m-s/sbin/nologin mysql & Nbsp;chown-r mysql.mysql /usr/local/mysql-5.7.9 chown-r mysql.mysql/usr/local/mysql & Nbsp;chgrp-r mysql/usr/local/mysql-5.7.9 4. Installing and initializing Databases cd/usr/local/mysql-5.7.9/ bin/mysql_install_db--user=mysql--basedir=/usr/local/mysql-5.7.9/--datadir=/usr/local/mysql-5.7.9/ data/ --must install MySQL 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 & [[email&Nbsp;protected] scripts]#/etc/init.d/mysqld restart shutting down MySQL. , &NB Sp [ ok ] starting MySQL ... &NBS P [ ok ] #开机启动 CHK Config--level mysqld on 5. Initializing the password mysql5.7 generates an initial password, while the previous version does not need to be logged on for the first time. shell> Cat/root/.mysql_secret mysql-uroot-p set PASSWORD = PASSWORD (' 123456 '); flush Privileges
MySQL 5.7 Installation manual (for Linux)