for the general user like to compile installation or Yum installation, in my work, usually with a binary rapid installation, here the installation steps are recorded as follows:
1. Download the binary file to the directory/home/www/tools
[email protected] tools]# LL
Total 102
-rw-r--r--1 root root 186722932 Apr mysql-5.5.32-linux2.6-x86_64.tar.gz
[Email protected] tools]#
2. Create the/application directory and its lower-face directory/application/mysql,/application/mysql/data
[Email protected] tools]# mkdir-p/application/mysql/data
[Email protected] tools]# tree/application/
/application/
└──mysql
└──data
2 directories, 0 files
[Email protected] tools]#
3. Install MySQL
LS mysql-5.5.32-linux2.6-x86_64.tar.gz
Tar XF mysql-5.5.32-linux2.6-x86_64.tar.gz
MV mysql-5.5.32-linux2.6-x86_64/application/mysql-5.5.32
Ln-s/application/mysql-5.5.32/application/mysql
######### #相当于编译步骤的make Install completed #############
4. Create Users and directories
Useradd mysql-s/sbin/nologin-m
Chown-r mysql.mysql/application/mysql/data/
5. Initializing the database
Cd/application/mysql
./scripts/mysql_install_db--user=mysql--basedir=/application/mysql--datadir=/application/mysql/data/
\CP support-files/my-small.cnf/etc/my.cnf
CP Support-files/mysql.server/etc/init.d/mysqld
chmod +x/etc/init.d/mysqld
Sed-i ' S#/usr/local/mysql#/application/mysql#g '/application/mysql/bin/mysqld_safe/etc/init.d/mysqld
/etc/init.d/mysqld start
Netstat-lntup|grep MySQL
Cp-a/application/mysql/bin/*/usr/local/sbin/
Mysqladmin Password Tnt123
Mysql-uroot-ptnt123
This article from "Flat Light is true" blog, please be sure to keep this source http://cryan.blog.51cto.com/10837891/1719529
Install MySQL database in binary mode