Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use unix domain socket for all connections to MySQL #83

Conversation

daichimukai
Copy link

moco-agent holds several MySQL connection pools. Most of these connections use unix domain sockets, but only one uses a TCP connection. This connection does not use TLS, so if MySQL is set to require_secure_transport=ON, moco-agent will not start.

This patch changes moco-agent to use unix domain sockets for all connections to MySQL. This change allows moco-agent to run even if require_secure_transport=ON is set for MySQL.

moco-agent holds several MySQL connection pools. Most of these
connections use unix domain sockets, but only one uses a TCP connection.
This connection does not use TLS, so if MySQL is set to
require_secure_transport=ON, moco-agent will not start.

This patch changes moco-agent to use unix domain sockets for all
connections to MySQL. This change allows moco-agent to run even if
require_secure_transport=ON is set for MySQL.

Signed-off-by: Daichi Mukai <[email protected]>
@daichimukai daichimukai force-pushed the use-uds-for-all-connections-to-mysql branch from 4bf3ab7 to 68a0864 Compare July 19, 2023 12:17
@masa213f masa213f self-requested a review July 21, 2023 02:52
@masa213f
Copy link
Contributor

@daichimukai
Thank you for creating this PR.

In my personal opinion, at least the health check should be checked over a TCP connection.
And by setting TLSConfig in the getMySQLConn(), we can avoid the crash of moco-agent.

And there are several problems besides this issue. (ref: cybozu-go/moco#544)
I want to close this PR and start over.

@daichimukai
Copy link
Author

@masa213f
I understand. Thank you for your detailed explanation.

@daichimukai daichimukai deleted the use-uds-for-all-connections-to-mysql branch July 24, 2023 10:30
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.

2 participants