WEB开发网
开发学院数据库MySQL 在同一台机运行多个Mysql服务 阅读

在同一台机运行多个Mysql服务

 2007-05-09 10:57:34 来源:WEB开发网   
核心提示: 从上述文字可看到多Mysql服务中最重要的就是my.cnf配置文件了.现我贴出我的my.cnf文件.---[mysqld_multi]mysqld = /usr/local/mysql/bin/mysqld_safemysqladmin = /usr/local/mysql/bin/mys

从上述文字可看到多Mysql服务中最重要的就是my.cnf配置文件了.

现我贴出我的my.cnf文件.-----------------------

[mysqld_multi]

mysqld = /usr/local/mysql/bin/mysqld_safe

mysqladmin = /usr/local/mysql/bin/mysqladmin

user = mysql  (用一个帐号来启动所有的mysql服务器,因为是用一相同的帐号。那个么这帐号必须都是每个mysql服务都要用的帐号,最好是管理帐号,下面的口令与相同)

password = mypaswd

[mysqld1]

port   = 3306

socket  = /tmp/mysql.sock1

pid-file=/usr/local/mysql/data1/db-app1.pid

log=/usr/local/mysql/data1/db-app.log

datadir = /usr/local/mysql/data

user = mysql

[mysqld2]

port = 3307

socket = /tmp/mysql.sock2

pid-file = /usr/local/mysql/data2/db-app2.pid

datadir = /usr/local/mysql/data2

log=/usr/local/mysql/data2/db-app.log

user = mysql

[mysqld3]

port      = 3308

socket     = /tmp/mysql.sock3

pid-file = /usr/local/mysql/data3/db-app3.pid3

datadir = /usr/local/mysql/data3

log=/usr/local/mysql/data3/db-app.log

user = mysql

[mysqld4]

port      = 3309

socket     = /tmp/mysql.sock4

pid-file = /usr/local/mysql/data3/db-app4.pid

datadir = /usr/local/mysql/data4

log=/usr/local/mysql/data4/db-app.log

user = mysql

[mysqldump]

quick

max_allowed_packet = 16M

上一页  1 2 3 4 5 6 7  下一页

Tags:同一 运行 多个

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接