Install MySQL 5.5 with the source code in CentOS 5.5

Source: Internet
Author: User

1. Install the dependency package.

1. yum install cmake

2. yum install gcc-c ++

3. yum install ncurses-devel

Ii. decompress the source code package

1. tar-zxvf mysql-5.5.8.tar.gz

Go to the extracted file .......

Iii. Compilation + Installation

1. Execute
Cmake-DCMAKE_INSTALL_PREFIX =/home/mysql_service/first_mysql/-Timeout =/home/mysql_service/first_mysql/data-DSYSCONFDIR =/home/mysql_service/first_mysql/-Timeout = 1-Timeout = 1 -DWITH_BLACKHOLE_STORAGE_ENGINE = 1-DWITH_FEDERATED_STORAGE_ENGINE = 1-DWITH_PARTITION_STORAGE_ENGINE = 1-DMYSQL_UNIX_ADDR =/home/mysql_service/first_mysql/mysqld. sock-DMYSQL_TCP_PORT = 3306-DENABLED_LOCAL_INFILE = 1-DEXTRA_CHARSETS = all-DMYSQL_USER = mysql

2. make

3. make install

Iv. Change the configuration file path
Under the mysql directory./mysql/support-files/
Cp my-medium.cnf ../my. cnf

5. Install the mysql System Library

Enter./mysql/scripts/Under the mysql directory/
1. Execute

. /Mysql_install_db -- basedir =/home/mysql_service/first_mysql -- datadir =/home/mysql_service/first_mysql/data -- defaults-file =/home/mysql_service/first_mysql/my. cnf -- user = mysql

# You must specify the path of the configuration file. The default path is/etc/my. cnf.

6. Compile the MySQL Startup Script
#! /Bin/sh
/Home/mysql-server/mysql/bin/mysqld_safe -- defaults-file =/home/mysql_service/first_mysql/my. cnf -- datadir =/home/mysql_service/first_mysql/data -- pid-file =/home/mysql_service/first_mysql/data/cos54110629.pid -- socket =/home/mysql_service/first_mysql/mysqld. sock -- user = mysql &

7. log on
Specify the mysqld. sock path when logging on
Mysql-S/home/mysql_service/first_mysql/mysqld. sock

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.