Environment Description:
Red Hat Enterprise Linux Server Release 6.5
Mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz
1. Create users and Groups:
[[email protected] ~] - + MySQL [[email protected] ~] - -p MySQL
2. Create the installation package upload directory, upload the installation package to the directory (the upload process is omitted):
[[email protected] ~] - /usr/local/MySQL
3. Unzip the installation package, unzip the package name to ' MySQL ':
[[email protected] local]# tar-ZXVF MySQL-5.6. the-Linux-GLIBC2.5-x86_64.tar.gz[[email protected] local]# mv MySQL-5.6. the-Linux-GLIBC2.5-x86_64 MySQL
4. The extracted document belongs to the main group and changed to Root:root, where data is changed to Mysql:mysql:
[[email protected] ~]# CD/Usr/Local/MySQL[[email protected] MySQL]# chown Root:root*[[email protected] MySQL]# chown Mysql:mysql data[[email protected] MySQL]# Lltotal thedrwxr-xr-X.2Root root4096Jan9 A: -bin-rw-R--R--. 1 root root 17987 Sep 19:41 COPYINGDrwxr-xr-X.3MySQL MySQL4096Jan9 A: -DATADRWXR-xr-X.2Root root4096Jan9 A: -DOCSDRWXR-xr-X.3Root root4096Jan9 A: -INCLUDEDRWXR-xr-X.3Root root4096Jan9 A: -LIBDRWXR-xr-X.4Root root4096Jan9 A: -MANDRWXR-xr-X.TenRoot root4096Jan9 A: -Mysql-Test-rw-R--R--. 1 root root 2496 Sep 19:41 READMEDrwxr-xr-X.2Root root4096Jan9 A: -SCRIPTSDRWXR-xr-X. -Root root4096Jan9 A: -SHAREDRWXR-xr-X.4Root root4096Jan9 A: -Sql-BENCHDRWXR-xr-X.2Root root4096Jan9 A: -Support-Files
5. Initialize the Authorization form:
[[email protected] ~] /usr/local/mysql[[email protected] MySQL]# Scripts/--user=mysql--datadir=/usr/local/mysql/data
6. Edit the configuration file:
[[email protected] ~]# CP/Usr/Local/Mysql/Support-Files/My-default. cnf/etc/my.cnf[[email protected] ~]# VI/etc/my.cnf---Modify the following content---Basedir= /Usr/Local/Mysqldatadir= /Usr/Local/Mysql/dataport= 3306
7. Map MySQL and mysqladmin directories:
[[email protected] ~]# CD/Usr/Local/bin[[email protected] bin]# ln-Fs/Usr/Local/Mysql/Bin/MySQL MySQL[[email protected] bin]# ln-Fs/Usr/Local/Mysql/Bin/Mysqladmin mysqladmin
8. Copy the Mysql.server boot script to the INIT.D directory:
[[email protected] ~] /usr/local/MySQL/support-files/etc/ init.d/MySQL
9. Start MySQL Servier:
[[email protected] bin]# service MySQL start
10. Change the password of the root user:
-uroot Password
11. Connect to MySQL Server:
[[email protected] bin]# MySQL-U root-penter password:welcome toThe MySQL Monitor. CommandsEnd with;or\g.your MySQL Connection ID is OneServer Version:5.6. *MySQL Community Server (GPL) Copyright (c) -, ., Oracleand/orits affiliates. Allrights reserved. Oracle isA registered trademark ofOracle Corporationand/oritsaffiliates. Names may trademarks oftheir respectiveowners. Type'Help ;' or '\h' forHelp. Type'\c' toClear the Currentinput Statement.mysql>
"Practice" Binary distribution install MySQL