MySQL Multi-instance
MySQL Multi-instance is a MySQL server to open a number of different ports, running multiple MySQL service processes, through different socket monitoring service ports to provide their own services, using different MY.CNF configuration files, start the program.
MySQL multi-instance function: Make full use of resources and save resources.
MySQL Multi-instance application: resource-intensive companies, concurrency is not a very large business, portal site.
MySQL Multi-instance deployment
1. Basic Environment
[Email protected]_multi-case ~]# cat/etc/redhat-release CentOS Release 6.6 (Final) [[Email protected]_multi-case ~]# una me-mr2.6.32-504.el6.x86_64 x86_64[[email protected]_multi-case ~]#/etc/init.d/iptables Statusiptables:firewall is Not running. [Email protected]_multi-case ~]# getenforcedisabled
2. Installing dependent software and compiling tools
Yum-y Install ncurses-devel libaio-devel #提供字符终端处理库 cd/server/tools/[[email protected]_multi-case tools]# lltotal 2958 0-rw-r--r--1 root root 5691656 Jul 11:24 cmake-2.8.8.tar.gz-rw-r--r--1 root root 24596474 Jul 11:25 mysql-5.5.32. Tar.gztar XF cmake-2.8.8.tar.gz cd cmake-2.8.8./configure gmakegmake INSTALLCD. /
3. Install MySQL
Useradd mysql -s /sbin/nologin -mid mysqltar xf mysql-5.5.32.tar.gz cd mysql-5.5.32cmake . -dcmake_install_prefix=/application/mysql-5.5.32 -dmysql_datadir=/ Application/mysql-5.5.32/data -dmysql_unix_addr=/application/mysql-5.5.32/tmp/mysql.sock -ddefault_ charset=utf8 -ddefault_collation=utf8_general_ci -dextra_charsets=gbk,gb2312,utf8,ascii - denabled_local_infile=on -dwith_innobase_storage_engine=1 -dwith_federated_storage_engine=1 - Dwith_blackhole_storage_engine=1 -dwithout_example_storage_engine=1 -dwithout_partition_storage_ Engine=1 -dwith_fast_mutexes=1 -dwith_zlib=bundled -denabled_local_infile=1 -dwith_ Readline=1 -dwith_embedded_server=1 -dwith_debug=0 make && make install ln -s /application/mysql-5.5.32/ /application/mysql ln -s /application/ mysql/bin/* /usr/local/bin/
4. Install MySQL multi-instance
This article is from the "Lanzhi" blog, make sure to keep this source http://7826443.blog.51cto.com/7816443/1715244
MySQL Multi-instance