[GH-ISSUE #4356] forward mysql failed #3440

Closed
opened 2026-05-05 14:12:57 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @wuyeguo on GitHub (Jul 29, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4356

Bug Description

config in frpc
proxies
name = "askxbot-mysql-tcp"
type = "tcp"
localIP = "172.16.1.141"
localPort = 3037
remotePort = 37051

server for mysql is ok

mysql -h172.16.1.141 -P3307 -uxxxxx -pxxxxx

mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 8.0.36 MySQL Community Server - GPL

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

but when use frps

mysql -hxxxxxx -P37051 -uxxxxx -pxxxxx

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

frpc Version

0.57.0

frps Version

0.57.0

System Architecture

Linux ecm-236c 5.4.0-190-generic #210-Ubuntu SMP Fri Jul 5 17:03:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Configurations

frps.toml

bindAddr = "0.0.0.0"
bindPort = 37000
kcpBindPort = 37000
tcpmuxHTTPConnectPort = 37001
vhostHTTPPort = 37002

auth.token = "***********"

# console or real logFile path like ./frps.log
log.to = "/service/frp/logs/frps.log"
# trace, debug, info, warn, error
log.level = "debug"
log.maxDays = 3
# disable log colors when log.to is console, default is false
log.disablePrintColor = false

webServer.addr = "127.0.0.1"
webServer.port = 37500
webServer.user = "*****"
webServer.password = "***********"

frpc.toml

serverAddr = "******"
serverPort = 37000

auth.token = "************"

[[proxies]]
name = "mysql-tcp"
type = "tcp"
localIP = "172.16.1.141"
localPort = 3037
remotePort = 37051

Logs

2024-07-29 16:19:11.685 [I] [proxy/proxy.go:204] [f6acd5fb9e1bfacf] [mysql-tcp] get a user connection [14.153.189.164:45728]
2024-07-29 16:19:11.685 [D] [server/control.go:272] [f6acd5fb9e1bfacf] get work connection from pool
2024-07-29 16:19:11.685 [D] [proxy/proxy.go:131] [f6acd5fb9e1bfacf] [mysql-tcp] get a new work connection: [14.153.189.164:40524]
2024-07-29 16:19:11.686 [D] [proxy/proxy.go:261] [f6acd5fb9e1bfacf] [mysql-tcp] join connections, workConn(l[10.0.0.49:37000] r[14.153.189.164:40524]) userConn(l[10.0.0.49:37051] r[14.153.189.164:45728])
2024-07-29 16:19:11.732 [D] [server/control.go:243] [f6acd5fb9e1bfacf] new work connection registered
2024-07-29 16:19:11.732 [D] [proxy/proxy.go:271] [f6acd5fb9e1bfacf] [mysql-tcp] join connections closed

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @wuyeguo on GitHub (Jul 29, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4356 ### Bug Description config in frpc [[proxies]] name = "askxbot-mysql-tcp" type = "tcp" localIP = "172.16.1.141" localPort = 3037 remotePort = 37051 server for mysql is ok # mysql -h172.16.1.141 -P3307 -uxxxxx -pxxxxx mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 8.0.36 MySQL Community Server - GPL Copyright (c) 2000, 2023, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective but when use frps # mysql -hxxxxxx -P37051 -uxxxxx -pxxxxx mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 ### frpc Version 0.57.0 ### frps Version 0.57.0 ### System Architecture Linux ecm-236c 5.4.0-190-generic #210-Ubuntu SMP Fri Jul 5 17:03:38 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ### Configurations # frps.toml ``` bindAddr = "0.0.0.0" bindPort = 37000 kcpBindPort = 37000 tcpmuxHTTPConnectPort = 37001 vhostHTTPPort = 37002 auth.token = "***********" # console or real logFile path like ./frps.log log.to = "/service/frp/logs/frps.log" # trace, debug, info, warn, error log.level = "debug" log.maxDays = 3 # disable log colors when log.to is console, default is false log.disablePrintColor = false webServer.addr = "127.0.0.1" webServer.port = 37500 webServer.user = "*****" webServer.password = "***********" ``` # frpc.toml ``` serverAddr = "******" serverPort = 37000 auth.token = "************" [[proxies]] name = "mysql-tcp" type = "tcp" localIP = "172.16.1.141" localPort = 3037 remotePort = 37051 ``` ### Logs 2024-07-29 16:19:11.685 [I] [proxy/proxy.go:204] [f6acd5fb9e1bfacf] [mysql-tcp] get a user connection [14.153.189.164:45728] 2024-07-29 16:19:11.685 [D] [server/control.go:272] [f6acd5fb9e1bfacf] get work connection from pool 2024-07-29 16:19:11.685 [D] [proxy/proxy.go:131] [f6acd5fb9e1bfacf] [mysql-tcp] get a new work connection: [14.153.189.164:40524] 2024-07-29 16:19:11.686 [D] [proxy/proxy.go:261] [f6acd5fb9e1bfacf] [mysql-tcp] join connections, workConn(l[10.0.0.49:37000] r[14.153.189.164:40524]) userConn(l[10.0.0.49:37051] r[14.153.189.164:45728]) 2024-07-29 16:19:11.732 [D] [server/control.go:243] [f6acd5fb9e1bfacf] new work connection registered 2024-07-29 16:19:11.732 [D] [proxy/proxy.go:271] [f6acd5fb9e1bfacf] [mysql-tcp] join connections closed ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@fatedier commented on GitHub (Jul 31, 2024):

Please do not submit questions about other application layers unless you are clearly aware that it is an issue caused by a bug in frp.

<!-- gh-comment-id:2259971216 --> @fatedier commented on GitHub (Jul 31, 2024): Please do not submit questions about other application layers unless you are clearly aware that it is an issue caused by a bug in frp.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3440
No description provided.