Install MySQL5.5.35 in CentOS6.3

Source: Internet
Author: User
Install MySQL5.5.35 in CentOS6.3 by using rpm or source code. This article uses mysql source code compilation and the compiler uses Cmake. Software requires mys

Install MySQL 5.5.35 in CentOS 6.3 By Using rpm and Source Code compiling. This article uses mysql Source Code compiling and the compiler uses Cmake. Software requires mys

Install MySQL 5.5.35 in CentOS 6.3 By Using rpm and source code. This article uses mysql source code compilation and the compiler uses Cmake. Software Release mysql-5.5.35.tar.gzand cmake-2.8.10.2.tar.gz. Please download them by yourself.

1. Install cmake

MySQL 5.5 and later versions have been replaced by the cmake tool./configure compilation and configuration method.

Therefore, we must first compile and install the cmake tool in the system source code.

[Root @ test ~] # Wget

[Root @ test ~] # Tar-zxvf cmake-2.8.10.2.tar.gz

[Root @ test ~] # Cdcmake-2.8.10.2

[Root@testcmake-2.8.10.2] #./configure

[Root @ test cmake-2.8.10.2] # make; make install

2. Make sure that the following system software packages are installed:

Run the rpm-qa | grep name command to verify whether all of the following software packages have been installed.

[Root @ test ~] # Yuminstall-y gcc * gcc-c ++ * autoconf * automake * zlib * libxml * ncurses-devel * libgcrypt * libtool *

If the related software package is missing, you can install it online using yum-y install, or find it directly from the system installation disc and install it using rpm-ivh.

3. system settings before installation

Create the mysql installation directory and data storage directory

Installation path:

[Root @ test ~] # Mkdir/usr/local/mysql

Database path:

[Root @ test ~] # Mkdir/data/mysql

Create users and user groups

[Root @ test ~] # Groupadd mysql

[Root @ test ~] # Useradd-g mysql

Grant the data storage directory permission

[Root @ test ~] # Chownmysql: mysql-R/data/mysql


4. Compile and install MySQL 5.5

Download Software packages from the official website or sohu images in China, such as the latest MySQL

[Root @ test ~] # Wget

[Root @ test ~] # Tar-zxvf mysql-5.5.35.tar.gz

[Root @ test ~] # Cdmysql-5.5.35

[Root@testmysql-5.5.35] # cmake. -DCMAKE_INSTALL_PREFIX =/usr/local/mysql-DMYSQL_UNIX_ADDR =/data/mysql. sock-DDEFAULT_CHARSET = utf8-DDEFAULT_COLLATION = utf8_general_ci-character: STRING = utf8, gbk-DWITH_INNOBASE_STORAGE_ENGINE = 1-DWITH_READLINE = 1-DENABLED_LOCAL_INFILE = incubator =/data/mysql/-DMYSQL_USER = mysql-connector = 3306


Parameter description:

-DCMAKE_INSTALL_PREFIX =/home/mysql // installation directory

-DINSTALL_DATADIR =/home/mysql/data // database storage directory

-DDEFAULT_CHARSET = utf8 // use the utf8 character

-DDEFAULT_COLLATION = utf8_general_ci // check the character

-DEXTRA_CHARSETS = all // install all extended character sets

-DENABLED_LOCAL_INFILE = 1 // allow local data import


[Root@testmysql-5.5.35] # make; make install

The percentage of progress can be seen in make and make install, which is better than configure.

Related reading:

How to install MySQL 6.4 in RHEL 5.6 (i386)

Linux website architecture series-Apache-deployment

Complete MySQL installation and master-slave dual-machine configuration

Install MySQL database in rpm mode on RHEL6 Platform

RedHat 6.3 MySQL-server-5.6.13-1.el6.x86_64.rpm Installation

Install MySQL5.6 and Python-MySQLdb in the source code of Ubuntu 12.04

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.