SOURCE Build MySQL

Source: Internet
Author: User

Source Installation MySQL

1. Description

New version MySQL Now you do not need to compile the installation, directly use Tar package inside the configuration file can be, so we describe here how to invoke the inside configuration file, so that the download of the MySQL source code can be installed and used.

2. Unzip and install MySQL

2.1 Unzip MySQL

[Email protected]_dev02 ~]# Tar xzvfmysql-5.6.23-linux-glibc2.5-x86_64.tar.gz

[[Email protected]_dev02 ~]# groupadd MySQL

[[Email protected]_dev02 ~]# useradd-m-s/sbin/nologin-gmysql MySQL

[Email protected]_dev02 ~]# chown-r mysql.mysql/data/intall/mysql

2.2 Copying a configuration file

[Email protected]_dev02 mysql-5.6.23]# cpsupport-files/mysql.server/etc/init.d/mysqld

[Email protected]_dev02 mysql-5.6.23]# chmod +x/etc/init.d/mysqld

[Email protected]_dev02 mysql-5.6.23]# chkconfig--addmysqld

2.3 Modifying a configuration file

[Email protected]_dev02 mysql-5.6.23]# vim/etc/my.cnf

[Email protected]_dev02 mysql-5.6.23]# Mkdir/var/data

[Email protected]_dev02 mysql-5.6.23]# chown-r mysql.mysql/var/data

2.4 the MySQL the header files, library files do soft links

[Email protected]_dev02 mysql-5.6.23]# ln-s/data/intall/mysql/bin/*/usr/bin/

[Email protected]ei_dev02 mysql-5.6.23]# ln-s/data/intall/mysql/lib/*/lib64/

[Email protected]_dev02 mysql-5.6.23]# ln-s/data/intall/mysql/include/mysql/*/usr/include/

2.5 Initializing the database

The default initialization database uses the pre-modified my.cnf , so we're going to specify the modified my.cnf

[Email protected]_dev02 mysql]# scripts/mysql_install_db--basedir=/data/install/mysql/--datadir=/var/data-- Defaults-file=/etc/my.cnf--user=mysql

3. start MySQL

[Email protected]_dev02 mysql]# MYSQLD_SAFE--DEFAULTS-FILE=/ETC/MY.CNF &


SOURCE Build MySQL

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.