CentOS 7 Source code compilation mysql-5.6.37

Source: Internet
Author: User

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

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.