运行多个mysql实例_在mysql中运行多个mysql实例

我想在同一台计算机的两个不同端口上使用MySQL服务器.我做了两个单独的配置文件.当我尝试在定义的第二个端口上连接到MysqL服务器时,则无法连接.运行MysqL的操作系统是Windows Vista.指定端口后,我还尝试从命令行启动MysqLd.

这是我已更改的示例文件,供MysqL服务器从两个不同的端口读取:

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MysqL client applications.

# Note that only client applications shipped by MysqL are guaranteed

# to read this section. If you want your own MysqL client program to

# honor these values,you need to specify it as an option during the

# MysqL client library initialization.

#

[client]

port=3306

[MysqL]

MysqL-path="C:\Program Files\MysqL\MysqL Server 5.1\bin"

default-character-set=latin1

[client]

port=3307

[MysqL1]

MysqL1-path="C:\Program Files\MysqL2\MysqL Server 5.1\bin"

default-character-set=latin1

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MysqL Server. Make sure that

# you have installed the server correctly (see above) so it reads this

# file.

#

[MysqLd]

MysqLd-path="C:\Program Files\MysqL\MysqL Server 5.1\bin\"

# The TCP/IP Port the MysqL Server will listen on

port=3306

#Path to installation directory. All paths are usually resolved relative to this.

basedir="C:/Program Files/MysqL/MysqL Server 5.1/"

#Path to the database root

datadir="C:/ProgramData/MysqL/MysqL Server 5.1/Data/"

#

server_id=1

[MysqLd1]

# The TCP/IP Port the MysqL Server will listen on

port=3307

server_id=2

MysqLd1-path="C:\Program Files\MysqL2\MysqL Server 5.1\bin\"

#Path to installation directory. All paths are usually resolved relative to this.

basedir="C:/Program Files/MysqL2/MysqL Server 5.1/"

#Path to the database root

datadir="C:/ProgramData/MysqL2/MysqL Server 5.1/Data/"

#

# The default character set that will be used when a new schema or table is

# created and no character set is defined

default-character-set=latin1

# The default storage engine that will be used when create new tables when

default-storage-engine=INNODB

# Set the sql mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值