1.1 Installation Dependencies
Yum Install Ncurses-devel libaio-devel-y
Rpm-qa Ncurses-devel Libaio-devel
1.2 Installing CMake
Yum Install Cmake-y
Rpm-qa CMake
1.3 Creating a MySQL User
Useradd-s/sbin/nologin-m MySQL
ID MySQL
1.4 Download/Unzip the source package
Wget-q https://cdn.mysql.com//Downloads/MySQL-5.6/mysql-5.6.37.tar.gz
Ls-l mysql-5.6.37.tar.gz
Tar XF mysql-5.6.37.tar.gz
CD mysql-5.6.37
1.5 Compiling the installation
CMake. -dcmake_install_prefix=/application/mysql-5.6.37 \
-dmysql_datadir=/application/mysql-5.6.37/data \
-dmysql_unix_addr=/application/mysql-5.6.37/tmp/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-dwith_extra_charsets=all \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwith_zlib=bundled \
-dwith_ssl=bundled \
-denabled_local_infile=1 \
-dwith_embedded_server=1 \
-denable_downloads=1 \
-dwith_debug=0
Make && make install
Ln-s/application/mysql-5.6.37//application/mysql
1.6 Initializing and configuring the database
cd/application/mysql/
\cp-a support-files/my*.cnf/etc/my.cnf
Chown-r mysql.mysql/application/mysql/
/application/mysql/scripts/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data--user =mysql
mkdir tmp
Chown-r Root.
CHOWN-R MySQL Data tmp
1.7 Set up boot, and start MySQL
\CP Support-files/mysql.server/etc/init.d/mysqld
chmod 700/etc/init.d/mysqld
Chkconfig mysqld on
Systemctl Start Mysqld.service
Ss-lntup|grep 330
1.8 Add Path Path
Echo ' path=/application/mysql/bin/: $PATH ' >>/etc/profile
Tail-1/etc/profile
Source/etc/profile
Echo $PATH
Mysql
CentOS 7 Source code compilation mysql-5.6.37