MySQL Multi-instance installation note

Source: Internet
Author: User

MySQL multi-instance compilation installation note

# wget-c Http://cdn.mysql.com/Downloads/MySQL-5.6/mysql-5.6.26.tar.gz

# CMake. -dcmake_install_prefix=/usr/local/mysql-dmysql_user=mysql

# Make && make install

The user in each instance is independent and starts all instances Mysqld_multi start after configuring/ETC/MY.CNF. Then add the-s option socket to configure a common user and password in order to close the load and other operations.

Related commands:

# mkdir-p/data/mysql/{3306,3307}/data

# mysql_install_db--basedir=/usr/local/mysql--datadir=/home/mysql/data_3307--user=mysql

Configure the/ETC/MY.CNF master configuration file, where each instance we need to add a [MYSQLDN] configuration. N is a number that, starting from 1, is used to identify each instance, and Mysqld_multi can be specifically managed to each instance by this number.

# Mysqld_multi Start

# Mysqld_multi Report

# mysql-uroot-p-s/usr/local/mysql-data/3307/3307.socket

Authorize Multi_admin to turn off database permissions, which is placed in the/ETC/MY.CNF configuration file

Mysql> GRANT SHUTDOWN on * * to ' multi_admin ' @ ' localhost ' identified by ' multi_pass ';

mysql> flush Privileges;

Detailed Reference Links:

http://freeloda.blog.51cto.com/2033581/1349312

Http://www.xuchanggang.cn/archives/516.html

Http://www.icyfire.me/2014/09/12/mysql-multiple-instances.html


MySQL Multi-instance installation note

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.