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

Too Many "Change User" in connection #627

Closed
ShiningRush opened this issue Apr 1, 2019 · 1 comment
Closed

Too Many "Change User" in connection #627

ShiningRush opened this issue Apr 1, 2019 · 1 comment
Labels

Comments

@ShiningRush
Copy link

Hi,
Our project use MySqlConnector to connect mysql instance of cloud,
then we find that there are too many db operation "Change User" in logs, and it is very cost time.

image

Some times it will cause timeout in opening connection.

What cause the "Change User" operation and how to avoid it ?
any helps is appreciated.

@bgrainger
Copy link
Member

What is your database server and version?

"Change user" (COM_CHANGE_USER) is used when retrieving a connection from the connection pool (to reset it back to a known good state) on MySQL Server v5.6.x and earlier.

If you're using MariaDB, make sure you're using MySqlConnector v0.50.0 or later: #613.

It is strongly recommended that you reset the connection so that server variables are reset, user-defined variables are cleared, temp tables are removed, etc. However, if you must disable this feature for performance reasons, you can set ConnectionReset=false in your connection string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants