MySQL Binary package quick Install

Source: Internet
Author: User

System Description: CentOS 6.4 mysql:5.5

#查看磁盘并配置一块lvs磁盘方便后续db文件空间不够的问题

Fdisk-l | grep "^disk/dev/*" vgspvcreate/dev/sddvgcreate mysqldb/dev/sddlvcreate-n mysqldba-l 99.9G Mysqldblvs

#创建mysql安装目录

Mkdir/mysqldata

# Create MySQL User

Groupadd mysql-g 3000useradd-g 3000-u 3000-r-s/sbin/nologin MySQL

#设置mysql Directory

Mkdir/usr/loca/mysqlchown Mysql.mysql!$

# download MySQL binary installation file package

CD! $wget http://cdn.mysql.com//archives/mysql-5.5/mysql-5.5.32-linux2.6-x86_64.tar.gz./scripts/mysql_install_db --basedir=/usr/local/mysql/--datadir=/mysqldata/data/--user=mysql

# mysql Boot file

Cp/usr/local/mysql/support-files/mysql.server/etc/init.d/mysqldchmod +x/etc/init.d/mysqldchkconfig mysqld on

# set MY.CNF file

MV/ETC/MY.CNF{,.BAK}CP My-small.cnf/etc/my.cnfvim/etc/my.cnf[mysqld]basedir=/usr/local/mysql/datadir=/mysqldata /data/port = 3306server-id = 1log-bin=/mysqldata/bin_log/bin_log_masterbinlog_format=mixed

# Configure MySQL bin startup and Help files

Vim/etc/profile.d/mysqld.shexport path= $PATH:/usr/local/mysql/binvim/etc/man.configmanpath/usr/local/mysql/man

# Follow the MySQL installation directory/usr/local/mysql/,/mysqldata/data/have Mysql.mysql permissions

And then you start MySQL.

This article is from the "Xiong" blog, make sure to keep this source http://xiong51.blog.51cto.com/5239058/1834800

MySQL Binary package quick Install

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.