MySQL CMake compilation single-instance installation

Source: Internet
Author: User
Tags chmod

To install the related package:
cd/home/oldboy/tools/
Rz-y
Tar XF cmake-2.8.8.tar.gz
CD cmaake-2.8.8
./configure
Gmake
Gmake Install
Cd..

Dependent Packages:

Yum Install Ncurses-devel-y

Start installing MySQL

Create users and Groups

Groupadd MySQL
Useradd mysql-s/sbin/nologin-m-G MySQL

Unzip compile MySQL

Tar XF mysql-5.5.32.tar.gz
CD mysql-5.5.32
CMake. -dcmake_install_prefix=/application/mysql-5.5.32 \
-dmysql_datadir=/application-5.5.32/data \
-dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock \
-DEXTRA_CHARSETS=GBK,BGK2312,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 \
-dwithout_partition_storage_engine=1 \
-dwith_fast_mutexes=1 \
-dwith_zlib=bundled \
-denabled_local_infile=1 \
-dwith_readline=1 \
-dwith_embedded_server=1 \
-dwith_debug=0

A character set that is not compiled:

#-ddefault_charset=utf8 \
#-ddefault_collatton=utf8_general_ci \

Make
Make install

Ln-s/application/mysql-5.5.32//application/mysql

Cd..
CP MYSQL-5.5.32/SUPPORT-FILES-FILES/MY-SMALL.CNF/ETC/MY.CNF

To configure environment variables:

Echo ' Export path=/application/mysql/bin: $PATH ' >>/etc/profile
Tail-1/etc/profile
Source/etc/profile
Failure problem: http://oldboy.51cto.com/2561410/1122867

Build MySQL Data file

Mkdir-p/application/mysql/dada

Authorizing MySQL users to access MySQL's installation directory

Chown-r mysql.mysql/application/mysql/data/


Adjust/TMP permissions, otherwise initialization will be wrong

Chmod-r 1777/tmp/

Install the MySQL database file, note the command path

cd/application/mysql/scripts/
./mysql_install_db--basedir=/application/mysql/--datadir=/application/mysql/data/--user=mysql

cd/home/oldboy/tools/mysql-5.5.32/
Copy the MySQL boot script to/ETC/INIT.D
CP Support-files/mysql.server/etc/init.d/mysqld
chmod +x/etc/init.d/mysqld

Start MySQL
/etc/init.d/mysqld start

MySQL CMake compilation single-instance installation

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.