MySQL5.5.32 compilation and Installation

Source: Internet
Author: User

MySQL5.5.32 compilation and Installation

MySQL Introduction
MySQL is a relational database management system developed by MySQL AB in Sweden. It is currently a subsidiary of Oracle. MySQL is the most popular Relational Database Management System. In terms of WEB applications, MySQL is one of the best applications of RDBMS (Relational Database Management System.
MySQL is an associated database management system that stores data in different tables rather than in a large warehouse. This increases the speed and flexibility.
The SQL language used by MySQL is the most common standard language for accessing databases. MySQL adopts the dual-Authorization Policy, which is divided into community edition and commercial edition. because of its small size, fast speed, and low total cost of ownership, especially open source code, generally, MySQL is used as the website database for the development of small and medium websites.

MySQL version Selection
Tip 1. Select the GA version. The Development version, Alpha version, and Beta version are generally not used in the project. Because they certainly have major problems or some functions are not fully implemented.
Tip 2: select the GA version. Do not select the latest version. Generally, select the first 3-4 or 10 months ago.
Tip 3. Check official instructions. No major bug updates are available.

Installation
MySQL has been installed using cmake since 5.3.
This version selects the MySQL5.5 series with the most users, and provides the 5.5.32 and the latest versions respectively.
MySQL5.5 Series
Http://dev.mysql.com/downloads/mysql/5.5.html#downloads

Preparations before installation

Current System
[Root @ oserr ~] # Cat/etc/RedHat-release
CentOS release 6.5 (Final)
[Root @ oserr ~] # Uname-r
2.6.32-431.23.3.el6.x86 _ 64
[Root @ oserr ~] # Uname-m
X86_64

1. Upload the required MySQL compilation installation package
You can use tools such as rz and ftp to upload files to a specified directory;
Demo: My directory stores the user's home directory
[Root @ E ~] # Cd/home/evan/tools/
[Root @ E tools] # rz
[Root @ E tools] # ls-l mysql-5.5.32.tar.gz
-Rw-r -- 1 root 24596474 April 14 09:23 mysql-5.5.32.tar.gz

2. Install the cmake Tool
MySQL has been installed using cmake since 5.3.
PS: if you do not want to bother, you can install yum (yum install cmake-y)
Cmake tool address
Https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
Demo:
Download Tool
[Root @ E tools] # pwd
/Home/evan/tools
[Root @ E tools] # wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
[Root @ E tools] # ls-l cmake-3.5.2.tar.gz
-Rw-r -- 1 root 6863498 April 16 01:40 cmake-3.5.2.tar.gz

Decompress cmake3.5.2
[Root @ E tools] # tar xf cmake-3.5.2.tar.gz
[Root @ E tools] # ls-ld cmake-3.5.2
Drwxr-xr-x 11 root 4096 April 27 09:45 cmake-3.5.2

Install cmake3.5.2
[Root @ E tools] # cd cmake-3.5.2
[Root @ E cmake-3.5.2] #./configure
[Root @ E cmake-3.5.2] # gmake
[Root @ E cmake-3.5.2] # gmake install
[Root @ E cmake-3.5.2] # cd ../

3. Install ncurses-devel dependency
Ncurses, a computer language, refers to the provision of character terminal processing libraries.
Yum install ncurses-devel-y

4. Install MySQL
Create users and groups
Groupadd mysql
Useradd mysql-s/sbin/nologin-M-g mysql

Decompress, compile, and install the file attachment)
Tar zxf mysql-5.5.32.tar.gz
Cd mysql-5.5.32
Cmake .\
-DCMAKE_INSTALL_PREFIX =/application/mysql-5.5.32 \ # specify the installation directory
-DMYSQL_DATADIR =/application/mysql-5.5.32/data \ # specify the data storage directory (important)
-DMYSQL_UNIX_ADDR =/application/mysql-5.5.32/tmp/mysql. sock \ # specify the sock path
-DDEFAULT_CHARSET = utf8 \ # specify the default Character Set
-DDEFAULT_COLLATION = utf8_general_ci \ # specify the encoding of the calibration Character Set
-DEXTRA_CHARSETS = gbk, gb2312, utf8, ascii \ # install the required Character Set
-DENABLED_LOCAL_INFILE = ON \ # enable local data loading
-DWITH_INNOBASE_STORAGE_ENGINE = 1 \ # support for innode storage engine
-DWITH_FEDERATED_STORAGE_ENGINE = 1 \ # support for the federated Engine
-DWITH_BLACKHOLE_STORAGE_ENGINE = 1 \ # Black Hole storage engine supported
-DWITHOUT_EXAMPLE_STORAGE_ENGINE = 1 \
-DWITHOUT_PARTITION_STORAGE_ENGINE = 1 \ # Database partitions supported for Installation
-DWITH_FAST_MUTEXES = 1 \
-DWITH_ZLIB = bundled \ # zlib compression mode
-DENABLED_LOCAL_INFILE = 1 \
-DWITH_READLINE = 1 \
-DWITH_EMBEDDED_SERVER = 1 \
-DWITH_DEBUG = 0 # Disable debug and enable it to affect performance.

# -- Build files have been written to:/home/evan/tools/mysql-5.5.32
Note: There are many options to be configured during compilation. For details, refer to the appendix at the end or the official documentation:
Make

# [2, 100%] Built target my_safe_process
Make install
Ln-s/application/mysql-5.5.32 // application/mysql

If no error occurs in the preceding operations, the installation of the MySQL5.5.32 software cmake method is successful.

This article permanently updates the link address:

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.