Install the dependency package first to avoid problems during the installation process
[[email protected] liuzhen]# yum-y install gcc gcc-c++[[email protected] liuzhen]# yum-y install Cmake[[email protected] liuzhen]# yum-y Install Ncurses-devel
MySQL Source: https://dev.mysql.com/downloads/mysql/5.6.html#downloads
SOURCE Package Address: https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.35.tar.gz
Create MySQL installation directory and data storage directory
[Email protected] liuzhen]# mkdir/usr/local/mysql[[email protected] liuzhen]# Mkdir/usr/local/mysql/data
Create a user, user group
[[email protected] liuzhen]# groupadd mysql[[email protected] liuzhen]# useradd-r-g MySQL MySQL
Start installation
[[email protected] liuzhen]# TAR-ZXVF mysql-5.6.35.tar.gz[[email protected] liuzhen]# CD Mysql-5.6.35[[email protected] mysql-5.6.35]# CMake. -dcmake_install_prefix=/usr/local/mysql-dinstall_datadir=/usr/local/mysql/data-ddefault_charset=utf8-ddefault_ Collation=utf8_general_ci-dextra_charsets=all-denabled_local_infile=1[[email protected] mysql-5.6.35]# make & & Make Install
CMake parameter Description:
-dcmake_install_prefix=/usr/local/mysql//default installation directory
-dinstall_datadir=/usr/local/mysql/data//Database storage directory
-ddefault_charset=utf8//using UTF8 characters
-DDEFAULT_COLLATION=UTF8_GENERAL_CI//Check character
-dextra_charsets=all//Install all extended character sets
-denabled_local_infile=1//Allow import of data from local
-dmysql_user=mysql
-dmysql_tcp_port=3306
CMake detailed configuration Please refer to the MySQL website
This article is from the "Liu" blog, make sure to keep this source http://liuzhenlife.blog.51cto.com/10591893/1892104
CentOs 7 64-bit source installation mysql5.6