enhancement: support more my.cnf client features

未关闭
#1,265 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 10 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
40/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
go, mysql
领域
cli, databases

调研方向

首先定位 gh-ost 对 my.cnf 的解析以及对 -host、-database 和 --defaults-group-suffix 的命令行处理。了解当前如何选择 [client] 块,然后验证使用文件中的值,并且显式 flags 会覆盖这些值,包括带后缀的 [clientXXXX] 块。完成的标准是这些配置组合能够用于多个 MySQL 服务器。

由索引模型根据 Issue 内容生成。

描述

I support a lot of different databases and DB servers, and it would be really convenient if gh-ost could make better use of my.cnf config files. Specifically:

  1. Reading hostnames and database names from the [client] block. Preferably, if a -host and/or -database flag is also passed, then that would override whatever is in the file. Right now, it ignores these lines altogether.

  2. Support the mysql "--defaults-group-suffix=" flag. This flag lets you have multiple [clientXXXX] blocks in your my.cnf, and choose which one to use. Right now gh-ost only supports the default [client] block with no suffix, which makes it more painful to use when working on multiple servers/clusters.

In its current form, gh-ost is somewhat awkward to use while working with multiple (unrelated) DB servers, because you need a different config file for each one and can't save DB names and hostnames in it. This would help us out a lot with that.

Cheers!

主要语言
Go
星标
13.6k
派生
1.4k
平均合并
9 天 19 小时
30 天内合并 PR
1

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/gh-ost 的其他 Issue

查看 github/gh-ost 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。