mysql多电脑互联_在一电脑上安装多mysql实例

本文档详细记录了在Windows环境下,从MySQL5.0升级到5.1的过程中遇到的问题及解决方案。主要涉及配置文件my.ini的修改,包括设置不同的端口、指定不同的数据目录。在配置过程中,由于innodb_data_home_dir与datadir不一致导致启动错误,参考官方文档解决了这一问题。
摘要由CSDN通过智能技术生成

我的环境:

原有一mysql5.0实例,现新安装一mysql5.1,并将新的5.1实例的数据路径放在另一目录。

mysql5.1的my.ini如下

(配置my.ini的参考资料:

http://dev.mysql.com/doc/refman/5.1/en/option-files.html

http://downloads.mysql.com/docs/mysql-windows-excerpt-5.1-en.pdf

http://dev.mysql.com/doc/refman/5.0/en/multiple-windows-servers.html

关键是几个属性:

client组、mysqld组的port要不同;

mysqld组的basedir指示mysql的安装目录;

mysqld组的datadir、innodb_data_home_dir前者是数据的目录,后者是innodb的数据目录,两者必须相同,否则会报错如下:

InnoDB: No valid checkpoint found.

InnoDB: If this error appears when you are creating an InnoDB database,

InnoDB: the problem may be that during an earlier attempt you managed

InnoDB: to create the InnoDB data files, but log file creation failed.

InnoDB: If that is the case, please refer to

InnoDB: http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html

100515 20:50:51 [ERROR] Plugin 'InnoDB' init function returned error.

100515 20:50:51 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

100515 20:50:52 [ERROR] Unknown/unsupported table type: INNODB

100515 20:50:52 [ERROR] Aborting;

)

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

# MySQL Server Instance Configuration File

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

# Generated by the MySQL Server Instance Configuration Wizard

#

#

# Installation Instructions

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

#

# On Linux you can copy this file to /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options

# (@localstatedir@ for this installation) or to

# ~/.my.cnf to set user-specific options.

#

# On Windows you should keep this file in the installation directory

# of your server (e.g. C:\Program Files\MySQL\MySQL Server X.Y). To

# make sure the server reads the config file use the startup o

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值