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