Compiling and installing Mysql5.5 database software

Source: Internet
Author: User

Preparation environment: Centos6.5 (6 Series operating system)

[Email protected] ~]# yum-y install gcc gcc-c++ ncurses-devel libxml2-devel zlib-devel pcre-devel

[Email protected] ~]# tar zxvf bison-2.5.tar.gz

[Email protected] ~]# CD bison-2.5

[[email protected] ~]#./configure &&make &&make Install

[Email protected] ~]# tar zxvf cmake-2.8.7.tar.gz

[Email protected] ~]# CD cmake-2.8.7

[[email protected] ~]#./bootstrap &&gmake &&gmake Install

[Email protected] ~]# tar zxvf mysql-5.5.22.tar.gz

[Email protected] ~]# CD mysql-5.5.22

[[email protected] ~]# useradd MySQL

[Email protected] ~]# Cmake-dcmake_install_prefix=/usr/local/mysql-ddefault_charset=utf8-ddefault_collation=utf8 _general_ci-dwith_extra_charsets=all-dsysconfdir=/etc/&&make &&make Install

Parameter comments: Install directory, default encoding, check character set, install all extended character sets, profile directory

[Email protected] ~]# chown-r: mysql/usr/local/mysql

[Email protected] ~]# Cd/usr/local/mysql/support-files

[email protected] ~]# CP my-medium.cnf/etc/my.cnf

[email protected] ~]# CP mysql.server/etc/init.d/mysqld

[Email protected] ~]# CD. /scripts/


The following operations will initialize MySQL, specify the base directory, store the data directory, and run the user

[Email protected] ~]#/mysql_install_db--basedir=/usr/local/mysql--datadir=/usr/local/mysql/data--user=mysql

[[email protected] ~]#/etc/init.d/mysqld start

[Email protected] ~]# echo "path= $PATH:/usr/local/mysql/bin" >>/etc/profile

[Email protected] ~]# Source/etc/profile

[[email protected] ~]# mysqladmin-u root password ' redhat ' set the MySQL run account and password, this root is not the root of the system user Oh!

[[email protected] ~]# mysql-u root-p

Enter Password:


OK, Installation complete


This article is from the "11000174" blog, please be sure to keep this source http://11010174.blog.51cto.com/11000174/1901834

Compiling and installing Mysql5.5 database software

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.