MySQL Universal binary format package installation

Source: Internet
Author: User

You can also download the installation files to the open source image station on the MySQL website.


Step one: Create a LV volume to enhance the spatial extensibility of MySQL database

[[email protected] pub]# pvcreate/dev/sdb{5,6}

[[email protected] pub]# vgcreate myvg/dev/sdb{5,6}

[Email protected] pub]# VGS

VG #PV #LV #SN Attr vsize vfree

MYVG 2 0 0 wz--n-200.01g 200.01g

[Email protected] pub]# lvcreate-l 50g-n mylv MYVG

[[email protected] pub]# LVS

LV VG Attr lsize Pool Origin data% Move Log cpy%sync Convert

MYLV myvg-wi-a-----50.00g

[Email protected] pub]# PVs

PV VG Fmt Attr PSize pfree

/DEV/SDB5 myvg lvm2 a--100.00g 50.00g

/DEV/SDB6 myvg lvm2 a--100.00g 100.00g


\ \ For Logical volume management refer to the blogger's LVM Logical Volume Manager Chapter


Step two: Format and mount to the MyData directory

[Email protected] pub]# mke2fs-t ext4-l mylv-b 4096/dev/myvg/mylv

[Email protected] pub]# Vim/etc/fstab

Label=mylv/mydata EXT4 Defaults 0 0

[Email protected] pub]# Mkdir/mydata

[Email protected] pub]# mount-a

[email protected] pub]# mount

/dev/mapper/myvg-mylv on/mydata type EXT4 (rw)


\ \ for disk partitioning and formatting please refer to the blogger's Linux partition mount


Step three: Create a MySQL database directory, and modify the genus Master Group

[Email protected] pub]# Mkdir/mydata/data

[Email protected] pub]# chown Mysql:mysql/mydata/data

[Email protected] pub]# ll/mydata/

Total 20

Drwxr-xr-x 2 mysql mysql 4096 Jul 1 21:13 data



Fourth step: Unzip the MySQL file and create a soft link to the MySQL directory

[Email protected] pub]# tar XF mysql-5.5.38-linux2.6-i686.tar.gz-c/usr/local

[[email protected] pub]# ss-tanl \ \ Check to see if the 3306 port is listening, please turn it off.

[Email protected] pub]# cd/usr/local/

[[email protected] local]# ln-sv mysql-5.5.38-linux2.6-i686 MySQL

' MySQL ', ' mysql-5.5.38-linux2.6-i686 '

[[email protected] local]# ls

Apache Apr14 Apr-util bin games lib MySQL


Fifth step: Modify the/usr/local/mysql directory of all the files belong to the main genus Group

[[Email protected] local]# CD MySQL

[Email protected] mysql]# chown-r root:mysql/usr/local/mysql/*


Sixth step: Modify the configuration file and join the startup service

[Email protected] mysql]# CD support-files/

[[email protected] support-files]# CP my-large.cnf/etc/my.cnf If already exists, backup, do not directly overwrite

[Email protected] support-files]# VIM/ETC/MY.CNF

Thread_concurrency = 2 Modifying the number of CPU cores

Datadir=/mydata/data Adding the Data directory

[email protected] support-files]# CP mysql.server/etc/rc.d/init.d/mysqld

[Email protected] support-files]# chkconfig--add mysqld

[Email protected] support-files]# chkconfig--list mysqld

Mysqld 0:off1:off2:on3:on4:on5:on6:off


Seventh Step: Execute script initialization

[Email protected] mysql]# rm-rf/mydata/data/*

[Email protected] mysql]# scripts/mysql_install_db--user=mysql--datadir=/mydata/data/


Eighth step: Start and log in to MySQL

[[Email protected] mysql]# service mysqld start

[Email protected] mysql]# vim/etc/profile.d/mysql.sh

Export Path=/usr/local/mysql/bin: $PATH exporting command path

: Wq

[Email protected] mysql]#. /etc/profile.d/mysql.sh performing a script import

[[email protected] mysql]# MySQL

Welcome to the MySQL Monitor.


Nineth step: View the Man Handbook

[Email protected] mysql]# Vim/etc/man.config

Manpath/usr/local/mysql/man

[[email protected] mysql]# ln-sv/usr/local/mysql/include//usr/include/mysql Export Header file

[[email protected] mysql]# vim/etc/ld.so.conf.d/mysql.conf Export Parent file

/usr/local/mysql/lib

[[email protected] mysql]# ldconfig-v |grep mysql configuration takes effect


This article is from the "Drops of love and tears to throw red beans" blog, please be sure to keep this source http://beijgh.blog.51cto.com/8272564/1433318

Related Article

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.