xelabs / go-mysqlstack

MySQL protocol library implementing in Go (golang)
BSD 3-Clause "New" or "Revised" License
242 stars 40 forks source link

Is there a way to retrieve the password from server side? #15

Closed kbfu closed 2 years ago

kbfu commented 2 years ago

Hi there, I was trying to start a mock server. I can get the user from the session, but I was unable to get the password from it. I would like to verify the password when some one connecting the mock server. I was not sure if I missed something. Any idea?

BohuTANG commented 2 years ago

I guess this is you want: https://github.com/radondb/radon/blob/master/src/proxy/auth.go#L68

Check the auth in the session.

kbfu commented 2 years ago

I guess this is you want: https://github.com/radondb/radon/blob/master/src/proxy/auth.go#L68

Check the auth in the session.

This is helpful. But I need to use the same password with the proxied MySQL server. Still, thanks in advance!