Documentation
¶
Overview ¶
Utility: gh-mysql-conf-diff
This utility prints a diff between `my.cnf` on disk with a running MySQL server and optionally applies the changes found to the server. The program honors version blocks (e.g. `[mysql-8.0]` blocks will only be checked for servers running `8.0.*`).
A simple run of the utility might be as follows:
$ gh-mysql-conf-diff /etc/mysql/my.cnf localhost:3306 Difference found for: CONNECT_TIMEOUT my.cnf: 60 mysqld: 30
By default the utility runs in read only (informational mode). To apply the changes, use the `--apply-changes` flag. This is not enabled by default. If you run `--apply-changes` you need to use `--watch-options“ as well:
$ gh-mysql-conf-diff /etc/mysql/my.cnf localhost:3306 \ --watch-options connect_timeout,delay_key_write --apply-changes
The program needs to connect to MySQL with a user that has the correct permissions. The username and password combo can be set using environment variables `$MYSQL_USER` and `$MYSQL_PASSWORD`.