Install MySQL5.6.12 in Linux source code (Cmake compilation)

Source: Internet
Author: User
Install MySQL5.6.12 in Linux source code (Cmake compilation)

Install MySQL 5.6.12 (Cmake compilation) in Linux source code)

1. Install the make Compiler (default system)

:

Tar zxvf make-3.82.tar.gz
Cd make-3.82
./Configure
Make
Make install

2. Install bison

:

Tar zxvf bison-2.5.tar.gz
Cd bison-2.5
./Configure
Make
Make install

3. Install gcc-c ++

:

Tar zxvf gcc-c00000000-4.4.4.tar.gz
Cd gcc-c ++-4.4.4
./Configure
Make
Make install

4. Install cmake

:

Tar zxvf cmake-2.8.4.tar.gz
Cd cmake-2.8.4
./Configure
Make
Make install

5. Install ncurses

:

Tar zxvf ncurses-5.8.tar.gz
Cd ncurses-5.8
./Configure
Make
Make install

Start to install MySQL ,,:

Preparations

Groupadd mysql
Useradd-r-g mysql

Decompress and install MySQL

Tar zxvf mysql-5.5.13.tar.gz
Cd mysql-5.5.13
Cmake ./
-DCMAKE_INSTALL_PREFIX =/usr/local/mysql/
-DINSTALL_DATADIR =/usr/local/mysql/data
Make
Make install

After completion, continue the following operations

Cd/usr/local/mysql
Chown-R mysql.
Chgrp-R mysql.
Scripts/mysql_install_db -- user = mysql
Chown-R root.

The following command is optional. Copy the mysql configuration file to/etc.

Cp support-files/my-medium.cnf/etc/my. cnf

Start mysql:

Bin/mysqld_safe -- user = mysql &
# Start mysql to check whether it is successful
Netstat-tnl | grep 3306

The above is a method to start mysql, there is a simple and convenient, as follows:

# Add the mysql startup service to the System Service
Cp support-files/mysql. server/etc/init. d/mysql. server
# Run the following command to start mysql:
Service mysql. server start
# Stopping the mysql Service
Service mysql. server stop
# Restart the mysql Service
Service mysql. server restart

Add the mysql service to the startup Item to enable the mysql service to start up.

Chkconfig -- add mysql. server

After the machine is restarted, the mysql service starts automatically.

Related reading:

Compile and install MySQL 5.5 Based on Cmake

Installing mysql-5.5.10 in Cmake Mode

Install MySQL 5.5.13 Cmake in CentOS

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.