Centos 6.5_64 Source Installation mysql_5.6.17

Source: Internet
Author: User
Tags openssl

MySQLfrom5.5version started, no longer used./configurecompile, but use theCMakecompiler, specificCMakecompile parameters can be referencedMySQLOfficial Documents(※very Important)
http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html

[Email protected]/]# cat/etc/redhat-release
CentOS Release 6.5 (Final)

(1) Download the source package

[[email protected] software]# ls

Mysql-5.6.17.tar.gz

(2) Install dependent packages

[[email protected] MySQL] #yum install gcc gcc-devel gcc-c++-devel autoconf* automake* zlib* libxml* ncurses-devel ncurses libgcrypt* libtool*cmake OpenSSL openssl-devel Bison bison-devel unzip-y

( 3 ) new users and Groups

[[email protected] MySQL] #groupadd MySQL

[[email protected] mysql]# useradd-g mysql-s/sbin/nologin MySQL

( 4 ) Create each directory

[[email protected] MySQL] #mkdir-p/data/mysql/etc Configuration file Directory

[[email protected] MySQL] #mkdir-p/data/mysql/dbdata Data Files directory

[[email protected] MySQL] #mkdir-p/data/mysql/tmp Temp directory

[[email protected] MySQL] #chown-R mysql.mysql/data/mysql/ modification of the principal and genus groups

( 5 ) unzip into the directory

[[email protected] MySQL] #tar zxvf mysql-5.6.17.tar.gz

[[email protected] MySQL] #cd mysql-5.6.17

( 6 ) Compile and install

[[Email protected]]# cmake-dcmake_install_prefix=/data/mysql-dsysconfdir=/data/mysql/etc-dmysql_datadir=/data/ Mysql/dbdata-dmysql_tcp_port=3306-dmysql_unix_addr=/data/mysql/tmp/mysqld.sock-dmysql_user=mysql-dextra_ Charsets=all-dwith_readline=1-dwith_ssl=system-dwith_embedded_server=1-denabled_local_infile=1-dwith_innobase_ Storage_engine=1-denable_downloads=1

[[Email protected]]# make &&make Install

-------------------------------------------------------------------------------------------------------------

Link to the client library file (no MySQL file will be found at PHP compile time if this step is not performed)

[Email protected] mysql-5.6.16]# ln-s/data/mysql/lib/libmysqlclient.so.18/usr/lib64/libmysqlclient.so.18

--------------------------------------------------------------------------------------------------------------

( 7 ) Start File configuration

[[Email protected]]# cpsupport-files/mysql.server/etc/init.d/mysqld

[Email protected]]# chmod +x/etc/init.d/mysqld

[[Email protected]]# vi/etc/init.d/mysqld

Basedir=/data/mysql

Datadir=/data/mysql/dbdata

( 8 ) Settings MySQL configuration file

[email protected] mysql-5.6.17]# CP support-files/my-default.cnf/data/mysql/etc/my.cnf

[Email protected] mysql-5.6.17]# ln-s/data/mysql/etc/my.cnf/etc/my.cnf

[[Email protected]]# ll/etc/my.cnf

lrwxrwxrwx. 1 Rootroot 22:09/etc/my.cnf-/data/mysql/etc/my.cnf

( 9 ) Initialize the database

[[email protected] MySQL] #cd/data/mysql/

[[Email protected]]#./scripts/mysql_install_db--user=mysql--basedir=/data/mysql--datadir=/data/mysql/dbdata

(Ten) LinksMySQLcommand,This step can be a lot more convenient, we can not write the path of the command, you can write/etc/profileof thePATHin

[Email protected] mysql]# Cd/usr/sbin

[Email protected] sbin]# ln-s/data/mysql/bin/*.

(one) set boot up, and start MySQL

[[email protected] sbin] #chkconfig mysqld on

[[email protected] sbin]# servicemysqld start

Starting MySQL. success!

( A ) Modify MySQL Password

[[email protected] sbin] #mysqladmin-uroot password

New Password:

Confirm NewPassword:

[Email protected] sbin]#


This article is from the "unplug the Operational Space" blog, please be sure to keep this source http://zhangdj.blog.51cto.com/9210512/1878733

Centos 6.5_64 Source Installation mysql_5.6.17

Related Article

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.