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