2018-03-24 MySQL Multi-instance installation learning notes

Source: Internet
Author: User
Tags mysql manual

2018-03-24mysql Multi-Instance Introduction
  1. 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.
  2. 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.
  3. 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
    • First log in to the Linux system as root and create MySQL groups and users

      Groupadd MySQL
      Useradd-s/sbin/nologin-g mysql-m MySQL

        user命令参数简要说明  -s /sbin/nologin 表示禁止该用户登陆,加强安全  -g mysql 制定属于mysql组  -M 表示不创建用户家目录
    • Check the created user

After the installation process slightly ...

3. Create a MySQL multi-instance data file directory

2018-03-24 MySQL Multi-instance installation learning notes

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.