CentOS 6.5 Source Installation MySQL5.6

Source: Internet
Author: User

1: Download Install CMake (mysql5.5 is compiled by CMake later)

123456789101112131415161718 #http://download.csdn.net/detail/csxuedn/7976005#wget http://www.cmake.org/files/v2.8/cmake-2.8.5.tar.gz# tar -zxv -f /root/cmake-2.8.4.tar.gz# cd cmake-2.8.4#./configureError whenbootstrapping CMake:Cannot find appropriate C++ compiler onthis system.Please specify one using environment variable CXX.See cmake_bootstrap.log forcompilers attempted.    #yum install gcc-c++#./configure# make && make install

  

2: Create MySQL installation directory and database storage directory

12 #mkdir -p /gechong/mysql                 //安装mysql#mkdir -p /gechong/mysql/data            //存放数据库

  

3: Create MySQL users and user groups

1 #groupadd mysql
1 #useradd -g mysql -s /bin/false-M mysql

  

4: Install MySQL

1 #wget http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.21.tar.gz

[[email protected] gechong]# ls
Mysql

[Email protected] gechong]# pwd
/gechong

1

[Email protected] gechong]# tar-zxv-f/root/mysql-5.6.21.tar.gz

[Email protected] gechong]# CD mysql-5.6.21/

Compile:

1234567 cmake . \-DCMAKE_INSTALL_PREFIX=/gechong/mysql \-DMYSQL_DATADIR=/gechong/mysql/data \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DEXTRA_CHARSETS=all\-DENABLED_LOCAL_INFILE=1

The error:

1234567891011 CMake Error at cmake/readline.cmake:85 (MESSAGE):  Curses library notfound.  Please install appropriate package,      remove CMakeCache.txt andrerun cmake.OnDebian/Ubuntu, package nameislibncurses5-dev, onRedhat andderivates it isncurses-devel.Call Stack (most recent call first):  cmake/readline.cmake:128 (FIND_CURSES)  cmake/readline.cmake:202 (MYSQL_USE_BUNDLED_EDITLINE)  CMakeLists.txt:427 (MYSQL_CHECK_EDITLINE) -- Configuring incomplete, errors occurred!

 

1 #yum -y install ncurses-devel

1 #rm -f CMakeCache.txt

  

Recompile:

# Make Clean

# rm-f CMakeCache.txt

# RM-RF/ETC/MY.CNF

1234567 cmake . \-DCMAKE_INSTALL_PREFIX=/gechong/mysql \-DMYSQL_DATADIR=/gechong/mysql/data \-DDEFAULT_CHARSET=utf8 \-DDEFAULT_COLLATION=utf8_general_ci \-DEXTRA_CHARSETS=all\-DENABLED_LOCAL_INFILE=1

1 #make && make install

Very slow ... Wait a while.

 

5: Configure MySQL

1 # cd /gechong/mysql<br># chown -R root:mysql .<br># chown -R mysql:mysql data

  

6:

1 # cp support-files/my-default.cnf /etc/my.cnf

  

7: Initialize permission table

1 #scripts/mysql_install_db --user=mysql

  

8: Start the MySQL service

123 #ln -s /gechong/mysql/bin/mysql /usr/bin#service mysqld start 

10: After the empty user login MySQL, delete the empty user, assign permissions to the user.

http://blog.csdn.net/langeldep/article/details/6223649

CentOS 6.5 Source Installation MySQL5.6

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.