mysql5.6.16 Compiling and installing

Source: Internet
Author: User

Install dependent packages

Yum-y install make gcc-c++ cmake bison-devel ncurses-devel perl*

Upload MySQL Compressed package locally

Put mysql-5.6.16.tar.gz

Tar XF mysql-5.6.16.tar.gz

CD mysql-5.6.16

CMake \

-dcmake_install_prefix=/usr/local/mysql \

-dmysql_datadir=/usr/local/mysql/data \

-DSYSCONFDIR=/ETC \

-dwith_myisam_storage_engine=1 \

-dwith_innobase_storage_engine=1 \

-dwith_memory_storage_engine=1 \

-dwith_readline=1 \

-dmysql_unix_addr=/var/lib/mysql/mysql.sock \

-dmysql_tcp_port=3306 \

-denabled_local_infile=1 \

-dwith_partition_storage_engine=1 \

-dextra_charsets=all \

-ddefault_charset=utf8 \

-ddefault_collation=utf8_general_ci


Make && make install

Groupadd MySQL

useradd-g MySQL MySQL

Chown-r Mysql:mysql/usr/local/mysql


Initializing MySQL Database

Cd/usr/local/mysql

scripts/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql

CP Support-files/mysql.server/etc/init.d/mysqld

Chkconfig mysqld on


Fill in the data storage path, do not write may cause the database to fail to start

Vim/etc/my.cnf

Datadir=/usr/local/mysql/data

: Wq

Service mysqld Start

adding paths to Path

Vim/etc/profile

Path=/usr/local/mysql/bin: $PATH

Export PATH


Source/etc/profile

Service mysqld Start

Mysql-uroot

Set a password for the database root user

mysql> SET PASSWORD = PASSWORD (' 123456 ');
Set the password for the remote login MySQL database

Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;

Exit, to this MySQL compile installation end




This article refers to the link: http://blog.csdn.net/wendi_0506/article/details/39478369

This article is from my Little Paradise blog, so be sure to keep this source http://9918511.blog.51cto.com/9908511/1639364

mysql5.6.16 Compiling and installing

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.