标签:mysql多实例
CleverCode最近在研究mysql的多实例,发现有两种方式:# vi /etc/my.cnf
[mysqld_multi] mysqld = /usr/local/mysql/bin/mysqld_safe mysqladmin = /usr/local/mysql/bin/mysqladmin #用于登陆和关闭此服务 user = root password = CleverCode123 [mysqld3306] #数据目录 datadir = /data0/dbdata/mysql/3306 #连接 port = 3306 socket = /tmp/mysql3306.sock #binlog log-bin=/data0/dbdata/mysql/3306/mysql-bin pid-file = /data0/dbdata/mysql/3306/mysql_3306.pid [mysqld3307] datadir = /data0/dbdata/mysql/3307 port = 3307 socket = /tmp/mysql3307.sock log-bin=/data0/dbdata/mysql/3307/mysql-bin pid-file = /data0/dbdata/mysql/3307/mysql_3307.pid [mysqld3308] datadir = /data0/dbdata/mysql/3308 port = 3308 socket = /tmp/mysql3308.sock log-bin=/data0/dbdata/mysql/3308/mysql-bin pid-file = /data0/dbdata/mysql/3308/mysql_3308.pid
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:mysql多实例
原文地址:http://blog.csdn.net/clevercode/article/details/47659457