Mysql source code Installation notes

Source: Internet
Author: User
Unzip and decompress tarxzf? Mysql-5.5.22.tar.gz, under the local directory will generate a directory of your corresponding software into the directory cd? Mysql-5.5.22

First is the source code download you can download from the official, you can also select a suitable version from the address below download http://download.chinaunix.net/download/0008000/7159.shtml and then decompress tar xzf? Mysql-5.5.22.tar.gz, under the local directory will generate a directory of your corresponding software into the directory cd? Mysql-5.5.22/

First, download the source code

You can download it either from the official website or from the address below

Http://download.chinaunix.net/download/0008000/7159.shtml

Then decompress tar xzf? Mysql-5.5.22.tar.gz, which will generate a directory of your corresponding software under the local directory

Go to the directory cd? Mysql-5.5.22/

Then start compilation and installation, but before compilation, you need some other programs.

During compilation and installation, the following five tools are required.

=> Installation tool:
1. cmake
-- Do not compile and install cmake by yourself
-- Shell :~ $ Sudo apt-get install cmake
-- Version: 2.8.2
(Mysql5.1 and later are no longer directly configure installation methods)
2. GNU make
-- Ubuntu comes
-- Version 3.81

3. GCC
-- Ubuntu comes
-- Version: 4.4.5 (Official Document: Must be later than 3.2)

4. Perl
-- Ubuntu comes
-- Version: 5.10.1

5. libncurses5-dev (ncurses-devel)
-- If this package is missing, an error will be reported during cmake.
-- The package name On Debian/Ubuntu is libncurses5-dev, and RedHat corresponds to ncurses-devel in other versions
-- Shell :~ $ Sudo apt-get install libncurses5-dev

I almost forgot. You also need to add mysql users and groups, create installation directories, and send chown to mysql users and groups.

sudo mkdir /usr/local/mysqlsudo mkdir /usr/local/mysql/datagroupadd mysqluseradd mysql -g mysqlchown -R mysql:mysql /usr/local/mysql

Next we can compile and install

Cmake-DCMAKE_INSTALL_PREFIX =/usr/local/mysql? -DMYSQL_DATADIR =/usr/local/mysql/data? -DWITH_MYISAM_STORAGE_ENGINE = 1? -DWITH_INNOBASE_STORAGE_ENGINE = 1? -DWITH_ARCHIVE_STORAGE_ENGINE = 1? -DWITH_BLACKHOLE_STORAGE_ENGINE = 1? -DENABLED_LOCAL_INFILE = 1? -DDEFAULT_CHARSET = utf8? -DDEFAULT_COLLATION = utf8_general_ci? -DEXTRA_CHARSETS = all? -DMYSQL_TCP_PORT = 3306? -DMYSQL_USER = mysql

Make

Sudo make install

Original article address: mysql source code Installation notes. Thank you for sharing them.

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.