Skip to content

How can I check mysql(not proxy) is healthy or not when start proxy #700

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

Open
nisainan opened this issue Jun 13, 2022 · 2 comments
Open

Comments

@nisainan
Copy link

I want to make sure mysql is healthy when I start this proxy,anyway fix this?

@skoef
Copy link
Contributor

skoef commented Jun 13, 2022

It depends what you consider healthy. Is MySQL healthy as soon as you are able to connect or run a test query? Perhaps you have a more complex setup where you'd have to wait until seconds_behind_master is below a certain threshold or do you have to wait until galera synchronised?

In my proxy implementation I run a Ping command to determine if the MySQL server is ready, but it depends on your situation if this applies there as well.

@nisainan
Copy link
Author

Here is the thing,I disposed mysql addr in proxy,but this addr was wrong,and proxy stared success.I want to check mysql status when start proxy,not when connection coming.GetConn() method will block when mysql addr is wrong,only if use context.WithTimeout().is there anyway return an error when use client.NewPool(..) method but mysql addr is wrong?

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 a pull request may close this issue.

2 participants