Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hosts IP address as user group instead of a guessed wildcard. #190

Open
wants to merge 1 commit into
base: v2.0
Choose a base branch
from

Commits on Jul 30, 2020

  1. Use hosts IP address as user group instead of a guessed wildcard.

    The wildcard approach has the issue, that it allows monitor connections
    to the MySQL nodes from a too big IP range. Having the first pxc nodes
    IP something like 10.1.2.3, proxysql-admin would create the monitor user
    with the host range of 10.%. This would contain the complete 10.0.0.0/8
    network which most likely contain other systems that are not supposed to
    be allowed to connect to MySQL, even if we are just talking about the
    monitor user.
    
    Another issue with the current solution pops up, when the IP address of
    the pxc node does not share the same first octet with the ProxySQL IP.
    Example:
      ProxySQL IP: 172.18.1.1
      PXC IP: 10.0.0.1
    Then the ProxySQL-Admin script will anyways create the monitor user as
    monitor@10.%, resulting in ProxySQL not being able to connect.
    
    In this commit, we use ifconfig to get the actual IP of the ProxySQL
    node and will therefore only allow the ProxySQL node to connect as
    monitor user.
    
    Co-authored-by: Isobel <[email protected]>
    mk-nwse and IzzySmith committed Jul 30, 2020
    Configuration menu
    Copy the full SHA
    aee78e0 View commit details
    Browse the repository at this point in the history