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/