MARIADB General Binary compilation installation details

Source: Internet
Author: User

First, unzip the package to install the Universal binary format

1. Prepare the required directory for data storage

This directory is a directory for mariaDB database data, typically mounted to a separate file system on the current server or a local directory

Here is an example of the /mysqldata catalogue :[[Email protected]~]# mkdir c11> /mysqldata

2. Create a system user MySQL and mysql group

[Email protected]~]# useradd-r MySQL

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7A/00/wKioL1agfcjCRZYJAABA9XaK22Q693.png "title=" 1.png " Style= "Float:none;" alt= "Wkiol1agfcjcrzyjaaba9xak22q693.png"/>

3. Change the owner group of the database storage directory

[Email protected]]# chown mysql:mysql/mysqldata/

Change as long as you also determine that the directory has executable permissions

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/7A/01/wKiom1agfY6DwO6CAABZ0zbdkzE496.png "title=" 2.png " Style= "Float:none;" alt= "Wkiom1agfy6dwo6caabz0zbdkze496.png"/>

4. Unzip the Universal Binary installation package:mariadb-5.5.46-linux-x86_64.tar.gz

You must rename it to MySQLafter you unzipit, and you can create a link to mysql here .

[[Email protected]~]# cd/usr/local

[Email protected]]# tar XF mariadb-5.5.46-linux-x86_64.tar.gz-c/usr/local

[[Email protected]]# ln-sv mariadb-5.5.46-linux-x86_64 MySQL

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7A/01/wKiom1agfZGwweKeAADWBmokHLY974.png "title=" 3.png " Style= "Float:none;" alt= "Wkiom1agfzgwwekeaadwbmokhly974.png"/>

5. Change the installer directory belong to MySQL group

[[Email protected]]# cd/usr/local/mysql/

[Email protected]]# chown-r root.mysql./*

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7A/00/wKioL1agfdLDwomnAADxYpc1D2s615.png "title=" 4.png " Style= "Float:none;" alt= "Wkiol1agfdldwomnaadxypc1d2s615.png"/>

6. Initializing the database file

[Email protected]]# scripts/mysql_install_db--user=mysql--datadir=/mysqldata

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7A/01/wKiom1agfZnjLaoVAADLg_8zPyg314.png "title=" 5.png " Style= "Float:none;" alt= "Wkiom1agfznjlaovaadlg_8zpyg314.png"/>

Second, Provide configuration files

1. Copy the profile template to the specified directory

[Email protected]]# CP support-files/my-large.cnf/etc/my.cnf

2. Modify configuration Document Information

[[Email protected]]# vim/etc/my.cnf

in the [Mysqld] Configuration Segment Add configuration information

DataDir =/mysqldata

Indicates the database file location

Innodb_file_per_table = On

Using stand-alone table spaces

Skip_name_resolve = On

prohibited IP Reverse parse to host name

Note:

(1) configuration file Lookup order for services

1) Osvendor provides mariadb RPM package:

/ETC/MYSQL/MY.CNF-->/etc/my.cnf-->--default-extra-file=/path/to/conf_file-~/.my.cnf

2) Universal binary format installation:

/ETC/MY.CNF--/etc/mysql/my.cnf-->--default-extra-file=/path/to/conf_file-~/.my.cnf

(2) [Program_name] configuration file Format

INI format, each program can obtain configuration information through this configuration file;[mysqld] is the server main configuration segment

(3) configuration file Templates

[Email protected]]# ls support-files/

under the support-files path . CNF files are the configuration file templates provided by the generic binary package, with the difference between the applicable database call memory size, Customizable parameters for modification

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7A/00/wKioL1agfdmRDZCZAACBq5pJ570560.png "title=" 6.png " Style= "Float:none;" alt= "Wkiol1agfdmrdzczaacbq5pj570560.png"/>

Third, Start the service

1. Copy the startup script

[Email protected]]# CP support-files/mysql.server/etc/init.d/mysqld

2. Add service to System startup && startup program

[Email protected]]# chkconfig--add mysqld

[[Email protected]]# service mysqld Start

When using the SS command Check to see that the 306 Port Attestation Service has been started

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/7A/01/wKiom1agfZ6CZ-Y5AAB1raQ_ZkY394.png "title=" 7.png " Style= "Float:none;" alt= "Wkiom1agfz6cz-y5aab1raq_zky394.png"/>


This article is from the "Xu Ding blog" blog, make sure to keep this source http://xuding.blog.51cto.com/4890434/1737136

MARIADB generic binary compilation installation detailed

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.