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

database/sql: Support for changing the username and password of an existing connection #17727

F21 opened this issue Nov 1, 2016 · 1 comment


Copy link

@F21 F21 commented Nov 1, 2016

Opening as per the suggestion in!topic/golang-nuts/_OakZP-dLZw

My use case for this feature it to support rotating username and passwords using Vault. Vault leases database usernames and passwords and forces clients to rotate them before expiry. Be able to update the username and password of an existing connection pool would be extremely useful.

All drivers currently use the DSN to pass in the username and password, so perhaps this could be generalized to updating the DSN of an existing database connection pool.

Copy link

@bradfitz bradfitz commented Nov 1, 2016

Sorry, I don't think we want to do this. Just re-open the database and with the new password.

/cc @kardianos

@bradfitz bradfitz closed this Nov 1, 2016
@golang golang locked and limited conversation to collaborators Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.