In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Multi-instance installation of MySQL database
Chapter 1 introduction of multiple examples of MySQL
To put it simply, MySQL multi-instance means that multiple different service ports (such as 3306, 3307) are opened on a server at the same time, and multiple MySQL service processes are run at the same time. These service processes provide services through different socket listening to different service ports.
These MySQL multiple instances share a set of MySQL installers that make different my.cnf (or the same) configuration files, launchers (or the same), and data files. When providing services, multi-instance MySQL is logically independent, and they obtain the corresponding number of hardware resources of the server according to the corresponding settings of the configuration file.
For example, multiple instances of MySQL are equivalent to multiple bedrooms of a house, each instance can be regarded as a bedroom, the whole server is a house, and the hardware resources (cpu,mem,disk) and software resources (Centos operating system) of the server can be regarded as the bathrooms, kitchens and living rooms of the house, which are the common resources of the house.
1.1 the role of MySQL multi-instance and problem Q the role of multi-instance
1) effective use of server resources
When there is a surplus of a single server resource, it can make full use of the remaining resources to provide more services, and can achieve the logical isolation of resources.
2) Save server resources
When the company is cash-strapped, but the database needs to provide services as independently as possible, and when technologies such as master-slave replication are needed, multiple instances are better.
Q drawbacks of multiple instances
MySQL multi-instance has its advantages, but it also has disadvantages, for example, there will be the problem of resource preemption.
When a database instance has high concurrency or has SQL slow query, the whole instance will consume a lot of resources such as system CPU and disk Imano, resulting in a decline in the quality of service provided by other database instances on the server. The resources acquired by different instances are relatively independent and cannot be completely isolated like virtualization.
1.2Common MySQL multi-instance configuration scenarios 1.2.1 single configuration file, single startup program multi-instance deployment scenario (too high coupling)
It is the configuration method recommended on the official website of MySQL, that is, the configuration of multiple instances in the same configuration file. For this scheme, the disadvantage is that the degree of coupling is too high and a configuration file is difficult to manage. The unified principle of work development and operation and maintenance: reduce the degree of coupling.
1.2.2 deployment scenario of multi-profile and multi-startup programs
Different instances have different profiles.
[root@mysql02 scripts] # tree / data//data/ ├── 3306 │ ├── data #
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.