MySQL-5.6.34 installation (centos7.2)

Source: Internet
Author: User

# #安装mysql需要的依赖包
Yum Install Ncurses-devel libaio-devel-y

# #安装编译MySQL需要的软件
As the MySQL5.5 and above series of products to be installed in a special way, it is necessary to install the commonly used compiled MySQL tool cmake software package, the command is:
Yum Install Cmake-y

# #上传软件到/home/oldboy/tools

Unzip the Tar XF

# #编译
CMake \
-dcmake_install_prefix=/application/mysql-5.6.34 \
-dmysql_datadir=/application/mysql-5.6.34/data \
-dmysql_unix_addr=/application/mysql-5.6.34/tmp/mysql.sock \
-ddefault_charset=utf8 \
-DDEFAULT_COLLATION=UTF8_GENERAL_CI \
-DEXTRA_CHARSETS=GBK,GB2312,UTF8,ASCII \
-denabled_local_infile=on \
-dwith_innobase_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwithout_example_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwtih_embedded_server=1 \
-dwith_debug=0

# #创建软连接
Ln-s/application/mysql-5.6.34//application/mysql
Useradd-s/sbin/nologin-m MySQL
Chown-r mysql.mysql/application/mysql/


# Copy configuration file
\cp/application/mysql/support-files/my-default.cnf/etc/my.cnf


# initialization
/application/mysql/scripts/mysql_install_db--basedir=/application/mysql--datadir=/application/mysql/data/-- User=mysql


# Authorized users
Chown-r MySQL. /application/mysql*


# Copy startup file
\cp/application/mysql/support-files/mysql.server/etc/init.d/mysqld


# Down right, down authority
chmod 700/etc/init.d/mysqld


# Boot from Boot
Chkconfig mysqld on

Chkconfig--list mysqld

/etc/init.d/mysqld start
# cp/application/mysql/bin/mysql/usr/local/sbin/
# The configuration file for the command.


echo "path=/application/mysql/bin/: $PATH" >>/etc/profile
Tail-1/etc/profile
. /etc/profile
Echo $PATH

MySQL-5.6.34 installation (centos7.2)

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.