Compile and install MariaDB.

Source: Internet
Author: User

Compile and install MariaDB.

What is MariaDB?

MariaDB is a branch of MySQL. Since Oracle may close the source of MySQL, it is separated (MySQL has been acquired by Sun and Oracle ).

However, apart from being a "downward alternative" to Mysql, some new features included in MariaDB make it better than MySQL.

Official Website description

The instructions on this page will help you compile MariaDB from source. Links to more complete instructions for specific platforms can be found on the source page.

First, get a copy of the MariaDB source.

Next, prepare your system to be able to compile the source.

If you don't want to run MariaDB as yourself, then you shoshould createmysqlUser. The example below uses this user.

Using cmake (MariaDB starting with 5.5)

MariaDB 5.5 and above is compiled usingCmake. You can configure your build simply by runningCmakeWithout any special options, like

cmake .

But if you want it to be configured exactly as we do for our releases, use

cmake . -DBUILD_CONFIG=mysql_release

AllCmakeConfiguration options for MariaDB can be displayed:

cmake . -LH

To build and install MariaDB after runningCmakeUse

makesudo make install

If the commands above fail, you can enable more compilation information by doing:

make VERBOSE=1

From: https://mariadb.com/kb/en/mariadb/generic-build-instructions/

The cmake option is similar to the mysql cmake option for reference (Chinese document): http://www.blogjava.net/kelly859/archive/2012/09/04/387005.html

Test practice

# Decompress

tar xfz mariadb-10.0.16.tar.gz

# Enter the installation directory

cd mariadb

# Configuration

cmake . -DCMAKE_INSTALL_PREFIX=/opt/waTeam/mariadb -DMYSQL_DATADIR=/home/datas/mariadb/data/ -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci

 
# Compilation takes about half an hour

make

# Installation

 
make install
So far, MariaDB compilation and installation are complete.

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.