Install the mysql5.7.9tar package in centos6.6
I. Tools used:
1. vmware10 Virtual Machine
2. centos 6.6
3. secureCRT
Ii. system settings:
1. Installation File Download Directory:/home/tools/
2. mysql installation directory:/usr/local/mysql
Iii. File Download:
Http://downloads.mysql.com/archives/get/file/mysql-5.7.9-linux-glibc2.5-x86_64.tar
1. Download the tar package in windows and import it to the/home/tools/directory using the rz command in centos.
2. Use the wget command in centos to download the SDK.
Note: rz and wget can be used without installation.
Iv. installation:
1. Decompress package: tar-zxvf mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz
2. Rename and move: Music mysql-5.7.9-linux-glibc2.5-x86_64/usr/local/mysql
3. Create a mysql user and group:
[Root @ study local] # id mysql
Id: mysql: No such user
# Useradd-s/sbin/nologin-M mysql
Note:-s: Specifies the shell used after the user logs on. The default value is/bin/bash.
-M: do not automatically create a user's logon directory.
4. Modify the permission to create data:
# Mkdir/usr/local/mysql/data
# Cd/usr/local
# Chown-R mysql: mysql/usr/local/mysql-R: recursion, changing directory and File Permissions
5. installation:
[Root @ study mysql] #./bin/mysqld -- initialize -- user = mysql -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/data
Record the temporary password and use:/lxW + 2 for the First Login <(9jk:
Configure the ssl configuration file:
[Root @ study mysql] # bin/mysql_ssl_rsa_setup -- datadir =/usr/local/mysql/data
6. mysql Configuration:
[Root @ study mysql] # cd support-files/
# Cp my-default.cnf/etc/my. cnf
# Cp mysql. server/etc/init. d/mysql
7. Set environment variables:
[Root @ study support-files] # vim/etc/profile
Add the last line of the file: export PATH =/usr/local/mysql/bin: $ PATH
Wq save and exit
[Root @ study support-files] # The source/etc/profile environment variable takes effect
8. Set boot start:
# Chkconfig mysql on
# Chkconfig | grep mysql
9. login test:
Check whether the mysql process exists: # ps-ef | grep mysql
# Service mysql start
# Mysql-uroot-p press enter and paste the previously recorded temporary password. login successful
Change the temporary password for the first time
: Change Password
Mysql> set password = password ('a123456 ');
Mysql authorization:
Mysql> grant all privileges on *. * to root @ '%' identified by 'a123456 ';
Update permission:
Mysql> flush privileges;
It can be used normally.