GitXplorerGitXplorer
g

gh-mysql-conf-diff

public
1 stars
0 forks
4 issues

Commits

List of commits on branch main.
Unverified
cc8364b7df7a6c6fa23071418e0ff02dea709b14

Added @rashiq as maintainer

aadamsc64 committed 4 months ago
Unverified
5ad6ce467c553f578aa8feb631702ebade5da33c

Moved example usage up and reformatted README

aadamsc64 committed 4 months ago
Unverified
cb659e28b375d341da3bd1f19b09f280fd47a605

Added Makefile

aadamsc64 committed 6 months ago
Unverified
c922ef8d0808f3556dab5d7288aef732ef66799a

Clarified to use the requirements section of the readme for prerequisites.

aadamsc64 committed 8 months ago
Unverified
66b8a772d077c59be3fa5b11602a8aab091e6073

Added CODEOWNERS

aadamsc64 committed 8 months ago
Unverified
2514a39fa7759413151142c2020cbc0c2493ebb1

Added instructions how to install the utility to README. Refactored from CONTRIBUTING.md

aadamsc64 committed 8 months ago

README

The README file for this repository.

gh-mysql-conf-diff

Description:

This tool provides a reliable and efficient way to ensure consistency between MySQL server variables and config option files. The utility compares my.cnf configuration files on disk with variables of a running MySQL server, providing easy visualization of any differences. Written in Go, the tool differs from similar tools by its ability to apply detected configuration changes directly to the server and its support for version-specific configuration blocks.

Example Usage

A simple run of the utility might be as follows:

$ gh-mysql-conf-diff /etc/mysql/my.cnf localhost:3306 --watch-options connect_timeout,delay_key_write

Difference found: 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

Current Project Status

The project is open to pull requests and the utility is actively used in production at GitHub.

Features:

  1. Compares my.cnf files with live MySQL server settings.
  2. Supports version-specific configuration blocks (e.g., [mysql-8.0]).
  3. Read-only informational mode by default.
  4. Option to apply changes to the server using --apply-changes flag.
  5. Allows specification of which options to watch and apply using --watch-options.
  6. User authentication through environment variables $MYSQL_USER and $MYSQL_PASSWORD.

Limitations:

  1. Requires user authentication with appropriate permissions.
  2. Only compatible with MySQL servers.
  3. Manual specification of options to watch when applying changes.

Goals and Scope: The primary goal of gh-mysql-conf-diff is to provide a reliable and efficient way to ensure consistency between MySQL server configurations and my.cnf files. It aims to streamline the configuration management process, reduce errors, and save time for database administrators. The utility is scoped to focus on comparing and optionally synchronizing configurations, without delving into other aspects of database management.

Background

Development Roadmap and Contributions

Development Roadmap: For a detailed view of our open issues, please refer to our tracker. Please feel free to submit feature requests or bugs.

Contributions: We highly value contributions from the community and encourage developers, database administrators, and other interested individuals to contribute to gh-mysql-conf-diff. Whether it's by reporting bugs, suggesting enhancements, or submitting code changes, your input is important to the growth and improvement of this tool.

For detailed guidelines on how to contribute, please see our CONTRIBUTING.md. This document provides all the information you need to get started with contributing to gh-mysql-conf-diff, including coding standards, pull request processes, and how to set up your development environment.

Your contributions are welcomed and greatly appreciated.

Requirements

To run gh-mysql-conf-diff, you need an environment capable of running Go (Golang) applications. The minimum requirements are:

  1. Install Go: The tool is developed in Go, so you need to have Go installed on your system. Ensure you have at least the version of Go in go.mod for optimal compatibility. You have two primary options for installing Go:

    • Option 1: Download and install the Go language runtime directly from the official Go website. The site provides installation instructions tailored to various operating systems.
    • Option 2: If you're a macOS user and have Homebrew installed, you can install Go using the Homebrew package manager. Simply run the following command in your terminal: brew install go. For more details, visit the Go formulae on Homebrew.
  2. MySQL Server Access: As the tool interacts with MySQL servers, you must have network access to a MySQL server you wish to compare configurations against. This can be a MySQL server running on localhost. You need a username and password of that server and they should be set in the environment variables $MYSQL_USER and $MYSQL_PASSWORD when the utility is run.

  3. MySQL Client Libraries: The tool requires MySQL client libraries for database communication. Install these libraries based on your operating system's package manager. For example:

    sudo apt-get install default-mysql-client
  4. Install the Utility: To install the latest version of the utility directly from GitHub, run go install:

    $ go install github.com/github/gh-mysql-conf-diff@latest

    Take note of where the binary is installed so you can run it or put it on the path.

License

Please refer to the license information for the full terms.

Authorship and Maintainers

Author: @adamsc64 Maintainers: @adamsc64 @rashiq

Support

Here are our support expectations:

  1. Community Support: For general questions or discussions, please reach out to the community on the DBAChat Slack.
  2. Issue Tracker: For reporting bugs or requesting new features, please use our issue tracker.
  3. Contribution: Users who wish to contribute fixes or improvements are welcome to do so. Please refer to our contribution guidelines for more information on how to contribute.

Please note that as an open-source project, support is largely dependent on the availability and capacity of our community and development team. We appreciate your understanding and patience.

Acknowledgement

This acknowledgment is a token of appreciation for the support, guidance, and resources provided by GitHub and its Database Infrastructure Team, which have been pivotal in the development and continued improvement of gh-mysql-conf-diff.