Install mysql5.5.28 from CentOS6.3 source code

Source: Internet
Author: User

The 64-bit CentOS6.3 system is installed with a minimal package. It is used as a local Web server and the entire process is recorded.
Step 6: Install mysql5.5 database v5.5.28

Mysql starts from Version 5.5 and does not use./configure for compilation. Instead, it uses the cmake compiler. For specific cmake compilation parameters, refer to the mysql official website documentation (※very important)
Http://dev.mysql.com/doc/refman/5.5/en/source-configuration-options.html

Source code package mysql-5.5.28.tar.gz:
Http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.28.tar.gz

My mysql directory configuration is as follows:
Installation path:/usr/local/mysql
Database path:/data/mysql
Source code package storage location:/usr/software

Preparation: Install the basic dependency package. First install cmake, automake, and autoconf with yum. Also, the minimum packages required for MySQL 5.5.x include bison, gcc, gcc-c ++, and ncurses-devel.
[Root @ localhost ~] # Yum install cmake make-y
[Root @ localhost ~] # Yum install gcc-c ++ autoconf bison automake zlib * fiex * libxml * ncurses-devel libmcrypt * libtool-ltdl-devel *-y
[Root @ localhost ~] # Cp/root/mysql-5.5.28.tar.gz/usr/software/
[Root @ localhost ~] # Cd/usr/software
Start compilation and Installation
[Root @ localhost ~] # Tar-zxvf mysql-5.5.28.tar.gz
[Root @ localhost ~] # Cd mysql-5.5.28
[Root @ localhost ~] # Cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \
-DMYSQL_UNIX_ADDR =/data/mysql. sock \
-DDEFAULT_CHARSET = utf8 \
-DDEFAULT_COLLATION = utf8_general_ci \
-DWITH_EXTRA_CHARSETS: STRING = utf8, gbk \
-DWITH_INNOBASE_STORAGE_ENGINE = 1 \
-DWITH_READLINE = 1 \
-DENABLED_LOCAL_INFILE = 1 \
-DMYSQL_DATADIR =/data/mysql /\
-DMYSQL_USER = mysql \
-DMYSQL_TCP_PORT = 3306
[Root @ localhost ~] # Make & make install

Brief translation of mysql official website English documents
The MyISAM, MERGE, MEMORY, and CSV engines are mandatory (always compiled into the server) and need not be installed explicitly. (Note: by default, mysql supports the following database engines: MyISAM, MERGE, MEMORY, and CSV. You do not need to declare them during compilation)
Therefore, the preceding compilation condition saves the following two rows:
-DWITH_MYISAM_STORAGE_ENGINE = 1 \
-DWITH_MEMORY_STORAGE_ENGINE = 1 \
However, INNODB must be installed in declarative mode.
-DWITH_INNOBASE_STORAGE_ENGINE = 1 \

Check whether mysql. mysql users and groups exist.

  • 1
  • 2
  • Next Page

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.