2018-03-24mysql Multi-Instance Introduction
- What is MySQL multi-instance
- Several different service ports (such as: 3306,3307) are opened on a single machine, running multiple MySQL service processes that provide their own services through different socket ships ' different service ports.
- These MySQL multiple instances share a set of MySQL installers that use different or identical my.cnf configuration files, startup programs, and data files.
- The function and problem of MySQL multi-instance;
- Efficient use of server resources
- Save server resources, require master-slave synchronization and other technologies, many instances of the better.
- Resource preemption Issues
- When a service instance is in high concurrency or has slow queries, the entire instance consumes more memory, CPU, and disk IO resources, resulting in reduced quality of service provided by other servers.
- MySQL Multi-instance application scenario
- Choice of capital-intensive companies
- Concurrent access is not a particularly large business
- Web portal Application MySQL multi-instance scenario
- The purpose of using multi-instance portal site is to match hardware server, save IDC cabinet space, and run multiple instances to make hardware resources not wasted.
4.mysql multi-instance common configuration scenarios
- Multiple configuration file Deployment Scenarios
- This article mainly explains the scheme, by configuring multiple configuration files and multiple startup programs to implement multi-instance scenarios, this is the method recommended by older boys.
- Single configuration file deployment scenario
- MY.CNF configuration File Sample (the method mentioned in the MySQL manual)
- Use the Mysqld_multi.
- Starting method: Mysqld_multi--config-file=/data/mysql/my_multi.cnf start 1,2,3,4,5,6,7
- Cons: High coupling, installation of multi-instance MySQL database
1. Create a MySQL multi-instance condition
- Install the MySQL installation dependent package
Yum Install Ncurses-devel-y
Yum Install Libaio-devel-y
- Select the binary installation method as an example
First install the data according to one of four kinds of MySQL installation methods, if it is compiled installation, then to make install deadline, this article according to the KISS principle, choose the simplest binary software as an example to explain the installation of MySQL multi-instance
2. Build MySQL Account
After the installation process slightly ...
3. Create a MySQL multi-instance data file directory
2018-03-24 MySQL Multi-instance installation learning notes