Mysql 5.7.13 installation and configuration method graphic tutorial (linux), mysql5.7.13
For your reference, the installation tutorial of Mysql 5.7.13 in linux is as follows:
1 system conventions
Installation File Download Directory:/data/software
Mysql directory installation path:/usr/local/mysql
Database storage location:/data/mysql
Log storage location:/data/log/mysql
2. Download mysql
On the official website: http://dev.mysql.com/downloads/mysql/, select the following version of mysql download:
Run 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. decompress the package to the target location.
# Mkdir/usr/local/mysql
# Cd/dat/software
# Pwd
The execution is 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
# Music mysql-5.7.13-linux-glibc2.5-x86_64 mysql
# Ls
4. Create a data warehouse directory
--/Data/mysql data WAREHOUSE directory
# Mkdir/data/mysql
# Ls/data/
5. Create a mysql user, group, and Directory
# --- Create an msyql Group
# Useradd-r-s/sbin/nologin-g mysql-d/usr/local/mysql --- create an msyql user to prohibit shell Login
6. Change the directory owner
# 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 the generated temporary password, as shown in the preceding figure: YLi> 7 ecpe; YP
# Bin/mysql_ssl_rsa_setup -- datadir =/data/mysql
8. Modify the System Configuration File
# Cp my-default.cnf/etc/my. cnf
# Cp mysql. server/etc/init. d/mysql
# Vim/etc/init. d/mysql
Modify the following content:
# Vim/etc/my. cnf
Modify the following content:
9 start mysql
# Bin/mysqld_safe -- user = mysql &
Bin/mysql -- user = root-p
-- Enter the temporary password generated in step 1
Mysql> set password = password ('a123456 ');
Mysql> grant all privileges on *. * to root @ '%' identified by 'a123456 ';
Mysql> flush privileges;
Mysql> use mysql;
Mysql> select host, user from user;
10 Add System Path
# Vim/etc/profile
Add:
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
The above is the installation tutorial of Mysql 5.7.13 in linux. I hope it will help you learn it.