当前位置: 首页 > news >正文

Windows MySQL5.5 搭建3307多实例从库(避坑完整版)

Windows MySQL5.5 搭建3307多实例从库(避坑完整版)

一、环境准备

系统:Windows10
数据库版本:MySQL5.5
原有实例:3306主库
新建实例:3307从库

二、完整操作步骤

1. 复制独立程序目录

复制原安装目录:
C:\Program Files (x86)\MySQL\MySQL Server 5.5 → 改名 MySQL Server 5.5_3307
复制原数据目录:
C:\ProgramData\MySQL\MySQL Server 5.5\Data → 改名 MySQL Server 5.5_3307\Data

核心要点:两个实例目录完全分离,不能共用文件夹。

2. 编写独立my.ini配置文件

在3307程序根目录新建my.ini(必须使用该文件名),只需要改端口号、路径,内容如下:

# 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 option # "--defaults-file". # # To run run the server from the command line, execute this in a # command line shell, e.g. # mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" # # To install the server as a Windows service manually, execute this in a # command line shell, e.g. # mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server X.Y\my.ini" # # And then execute this in a command line shell to start the server, e.g. # net start MySQLXY # # # Guildlines for editing this file # ---------------------------------------------------------------------- # # In this file, you can use all long options that the program supports. # If you want to know the options a program supports, start the program # with the "--help" option. # # More detailed information about the individual options can also be # found in the manual. # # #
http://www.jsqmd.com/news/1080298/

相关文章:

  • 一个神级 AI 插件,暴涨 48000+ GitHub Star!
  • 3DEXPERIENCE平台是什么,达索数字化协同详解
  • G-Helper华硕笔记本硬件控制架构解析:实现轻量化系统优化的最佳实践
  • Facebook高ROAS打法
  • LeetDown:如何在10分钟内完成iOS设备安全降级的终极指南
  • 【IDEA安装避坑指南】:20年Java架构师亲授Windows/macOS/Linux三端零错误安装全流程(附官方镜像校验码)
  • 电赛实战指南:从硬件设计到软件调试的工程能力跃迁
  • FanControl深度配置指南:从基础控制到高级优化的完整解决方案
  • 通讯行业招标平台有哪些?通信企业找项目必看
  • 从“单点”到“全流程”——俊亿供应链借力 PEO 实现 X 国用工管理升级
  • 电商主图做完了,怎么用 AI 顺手做成短视频广告?
  • 基于Stackelberg博弈与可排空性护栏的云GPU动态定价与扩缩容实践
  • 【VMware Java环境一键部署秘籍】:12步标准化流程+8个关键参数调优点,错过等于多写200行重复配置代码
  • 前端播放flv
  • QKeyMapper:打破设备限制的Windows按键映射神器
  • 从VMware Workstation到vCenter——Web服务器跨平台迁移全路径(含Apache→Nginx无缝切换实录)
  • 多款国产智能体实测对比:深挖自研全栈产品在复杂业务场景下的稳定性护城河
  • 干货合集:盘点2026年最受喜爱的的AI论文平台
  • 【数据库系统原理】第28篇:多粒度封锁与意向锁:锁定层级的效率优化
  • 滴滴地图全自研技术揭秘:为什么它比高德 / 百度 / 腾讯更好用?
  • 动图魔方技术拆解 07:ArkTS 实现 GIF LZW 编码与数据子块写入
  • 【JavaScript】 隐式类型转换
  • 从 RAG 到 Agent-native Knowledge Context Layer
  • 仅限内部技术团队流传的VMware MySQL部署Checklist(含vCPU分配公式、swap禁用策略、vmx参数优化表)
  • Openclaw大模型Minimax-m3 Token plan 9折优惠
  • 一键复刻生产级Python环境,VMware+Ubuntu+Miniconda+VS Code全链路配置指南,手慢无的2024最新实践模板
  • LeetDown:终极iOS降级工具完整使用指南
  • G-Helper完整指南:ROG掌机终极优化与自定义教程
  • 终极数据恢复指南:TestDisk与PhotoRec免费解决方案
  • SubFinder智能字幕搜索工具:三分钟解决影视字幕匹配难题