Skip to content

docs: say that 3306 and 4000 are only a hint for MySQL - #941

Merged
slayerjain merged 1 commit into
mainfrom
docs/mysql-ports-are-a-hint
Oct 26, 2026
Merged

slayerjain merged 1 commit into
mainfrom
docs/mysql-ports-are-a-hint

Conversation

@slayerjain

@slayerjain slayerjain commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

What has changed?

The configuration page (versioned_docs/version-4.0.0/running-keploy/configuration-file.md) said Keploy always treats 3306 and 4000 as MySQL, and that listing a port in mysqlPorts adds it to that set. Both halves are wrong. A non-empty list replaces the built-in ports, and with keploy/keploy#4928 the built-in ports are only a hint.

  • mysqlPorts (field list and "When to set these fields"): a listed port is pinned to MySQL. Keploy waits for a MySQL greeting on every connection to it, so an HTTP service on a listed port gets no answer. A list replaces 3306 and 4000; while detection is on, Keploy still identifies MySQL there as on any other port.
  • During Record: whichever side of the connection speaks first decides. A client that speaks first (HTTP, gRPC, PostgreSQL) isn't MySQL, and Keploy routes it by the client's bytes.
  • During Test: on 3306 and 4000 the recording decides. A port where Keploy recorded an HTTP or gRPC service and no MySQL replays as that protocol.
  • disableMysqlAutoDetect: with detection off and mysqlPorts empty, 3306 and 4000 are pinned to MySQL again.
  • Troubleshooting (keploy-explained/common-errors.md): a new entry, "An HTTP service on port 3306 or 4000 gets no answer while recording", with its three causes (port listed, detection off, an older Keploy version) and their fixes.

This describes the behavior of keploy/keploy#4928. Merge it after the Keploy release that carries that PR.

Type of change

  • Documentation update (if none of the other choices apply).

How Has This Been Tested?

  • Prettier: both pages pass the repo's Prettier 2.8.8 check.
  • Build: not built locally; the PR's deploy-preview build passes. The one new link uses the same relative path and anchor as the existing MySQL handshake entry on the same page.
  • Behavior: each statement matches a test in fix(proxy): a default MySQL port is a hint, so HTTP on 4000 is relayed keploy#4928. Its unit tests cover HTTP on 3306 and 4000 relayed at record and replayed as HTTP, MySQL there still recorded and replayed as MySQL, and a listed port or a default port with detection off staying pinned. The repeated-headers e2e lane records and replays an HTTP dependency on 4000, also under KEPLOY_PROVEN=1.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.

The configuration page said Keploy always treats 3306 and 4000 as MySQL
and that listing a port in mysqlPorts adds it to that set. Both halves
are wrong. A non-empty list replaces the built-in ports, and once
keploy/keploy#4928 lands the built-in ports are only a hint: at record,
whichever side of the connection speaks first decides, so an HTTP
service on 4000 is relayed as HTTP; at replay, the recording decides.

A listed port is pinned to MySQL, and so are 3306 and 4000 while
detection is off, so an HTTP service there gets no answer. Say so on the
configuration page, and add a troubleshooting entry for an HTTP service
on 3306 or 4000 that gets no answer while recording.

Signed-off-by: slayerjain <[email protected]>
@slayerjain
slayerjain marked this pull request as ready for review October 26, 2026 16:16
@slayerjain
slayerjain merged commit 0b4479d into main Oct 26, 2026
6 checks passed
@slayerjain
slayerjain deleted the docs/mysql-ports-are-a-hint branch October 26, 2026 16:16
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