github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.44k stars 1.26k forks source link

enhancement: support more my.cnf client features #1265

Open superawesome opened 1 year ago

superawesome commented 1 year ago

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!

superawesome commented 1 year ago

I can't figure out how to (or don't have access to) add labels to this, sorry. So I put it in the subject... it's an enhancement idea/request.