Skip to content

Deprecate $MYSQL_UNIX_PORT environment variable#1720

Open
rolandwalker wants to merge 1 commit intomainfrom
RW/deprecate-mysql-unix-port-env-variable
Open

Deprecate $MYSQL_UNIX_PORT environment variable#1720
rolandwalker wants to merge 1 commit intomainfrom
RW/deprecate-mysql-unix-port-env-variable

Conversation

@rolandwalker
Copy link
Contributor

Description

Deprecate $MYSQL_UNIX_PORT environment variable in favor of $MYSQL_UNIX_SOCKET. We can do this pretty freely since the feature was not documented.

Motivation: a Unix Domain Socket is not a TCP/IP Port, though both are available on Unix and Unix-likes. The variable name was very confusing.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Mar 17, 2026
@github-actions
Copy link

  1. Missing regression tests for env var migration path (low)
    • Change introduces new behavior at main.py:1924 and fallback/deprecation logic at main.py:2215, but this PR adds no coverage in test/test_main.py.
    • Add targeted CLI tests for:
      • MYSQL_UNIX_SOCKET is honored.
      • MYSQL_UNIX_PORT still works (with warning).
      • precedence when both are set (MYSQL_UNIX_SOCKET wins).
      • explicit --socket overriding env vars.

No correctness or security bugs stood out in the patch itself.

I couldn’t run tests locally here because pytest is not installed in this environment (pytest: command not found).

@rolandwalker rolandwalker force-pushed the RW/deprecate-mysql-unix-port-env-variable branch from 786d750 to a2407e8 Compare March 17, 2026 09:14
in favor of $MYSQL_UNIX_SOCKET.  We can do this pretty freely since the
feature was not documented.

Motivation: a Unix Domain Socket is not a TCP/IP Port, though both are
available on Unix and Unix-likes.  The variable name was very confusing.
@rolandwalker rolandwalker force-pushed the RW/deprecate-mysql-unix-port-env-variable branch from a2407e8 to 2128428 Compare March 17, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant