Install MySQL database in binary mode

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.