Skip to content

Instantly share code, notes, and snippets.

@darkcolonist
Created February 8, 2023 03:44
Show Gist options
  • Save darkcolonist/35c16b8492df340515ccf527e1bdfc17 to your computer and use it in GitHub Desktop.
Save darkcolonist/35c16b8492df340515ccf527e1bdfc17 to your computer and use it in GitHub Desktop.
2023-02-08 how to pass client IP from HA-Proxy version 1.6.3 2015/12/25 to 10.4.13-MariaDB
# mysql 3307
frontend mysql3307-in
bind *:3307 name port3307
mode tcp
default_backend mysql3307-in_mes
timeout client 1h
backend mysql3307-in_mes
mode tcp
option forwardfor
option mysql-check user haproxy
server mes-mysql 10.1.41.61:3307 send-proxy
[mysqld]
proxy-protocol-networks=::1, 10.1.0.0/16, localhost
bind-address=10.1.41.61
skip-name-resolve
port=3307
datadir=E:/User/Program Files/mariadb-10.4.13-winx64-experimental-3307-data
[mysql]
bind-address=10.1.41.61
[client]
port=3307
plugin-dir=E:/User/Program Files/mariadb-10.4.13-winx64/lib/plugin
@darkcolonist
Copy link
Author

before:
image

after:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment