Linux environment MySQL 5.7.13 installation tutorial to share with you for your reference, the specific content as follows
1 System Conventions
installation files Download directory:/data/software
MySQL Directory Installation location:/usr/local/mysql
Database Save location:/data/mysql
Log Save location:/data/log/mysql
2 download MySQL
In the official website: http://dev.mysql.com/downloads/mysql/, select the following version of MySQL download:
Perform the following name:
#mkdir/data/software
#cd/data/software
#wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
3 decompression compression package to target location
# Mkdir/usr/local/mysql
#cd/dat/software
#pwd
Implemented as follows:
#ls
#cd/usr/local
#pwd
# tar-xzvf/data/software/mysql-5.7.13-linux-glibc2.5-x86_64.tar.gz
#ls
--Modify File name
# mv Mysql-5.7.13-linux-glibc2.5-x86_64 MySQL
#ls
4 Creating the Data Warehouse directory
--/data/mysql Data Warehouse Directory
# Mkdir/data/mysql
#ls/data/
5 new MySQL users, groups and directories
#---Create a new MSYQL group
# useradd-r-s/sbin/nologin-g mysql mysql-d/usr/local/mysql---New MSYQL user is not allowed to log on to the shell
6 Change of directory belong to a person
#cd/usr/local/mysql
#pwd
#chown –R MySQL.
#chgrp –R MySQL.
#chown-R Mysql/data/mysql
7 Configuration parameters
# bin/mysqld--initialize--user=mysql--basedir=/usr/local/mysql--datadir=/data/mysql
Note that the temporary password generated by the record is required here, as above:yli>7ecpe; Yp
#bin/mysql_ssl_rsa_setup--datadir=/data/mysql
8 Modifying system configuration Files
# CP MY-DEFAULT.CNF/ETC/MY.CNF
# CP Mysql.server/etc/init.d/mysql
# Vim/etc/init.d/mysql
Modify the following:
# VIM/ETC/MY.CNF
Modify the following:
9 Start MySQL
#bin/mysqld_safe--user=mysql &
Bin/mysql--user=root–p
--Enter the temporary password generated in step 6th
Mysql> set Password=password (' A123456 ');
Mysql>grant all privileges in *.* to root@ '% ' identified by ' A123456 ';
mysql> flush Privileges;
mysql> use MySQL;
Mysql> select Host,user from user;
10 Adding system paths
# Vim/etc/profile
Add to:
Export Path=/usr/local/mysql/bin: $PATH
As follows:
# Source/etc/profile
11 Configure MySQL to start automatically
# chmod 755/etc/init.d/mysql
# chkconfig--add MySQL
# chkconfig--level 345 MySQL on
Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials
The above is the Linux environment MySQL 5.7.13 installation tutorial, I hope to help you learn.