MySQL single machine multi-instance solution deployment

Source: Internet
Author: User

MySQL single machine Multiple instance scenario, refers to running multiple MySQL database instances on a single physical server.

The advantages of MySQL single machine multi-instance:

1, save the cost, reduce the number of servers, IP, cabinets, the overall operating cost is lower than single stand-alone case scheme.

2, improve utilization, using NUMA characteristics, the MySQL instance CPU binding.

3, enhance the user experience, greatly improve the IO response time, to help improve the user experience.

Detailed implementation of MySQL multi-instance deployment

1, MySQL multi-instance directory planning (data directory configuration file directory)

Instance 1

Data path:

/home/mysql/data

Configuration file path:

/usr/local/mysql5/etc/lyq314.cnf

Instance 2

Data path:

/home/mysql/data_log

Configuration file path:

/usr/local/mysql5/etc/lyq314_log.cnf

2, MySQL Multiple instance configuration file modification

Instance 1 configuration file modification (you can do without modification)

Vim/usr/local/mysql5/etc/lyq314.cnf

[Client]

#password = Your_password

3306 port=

socket=/tmp/mysql.sock

22

# here follows entries for some specific programs

24

# The MySQL server

num [mysqld]

Port= 3306

socket=/tmp/mysql.sock

Pid-file= Mysql.pid

Skip-external-locking

Skip-name-resolve

This column more highlights: http://www.bianceng.cn/database/MySQL/

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.