[feat] Add extra error output on lost server error to indicate possible SSL mismatch (#1584)#1609
Conversation
|
Findings (ordered by severity)
No security concerns found in this change. If you want, I can draft the test case. |
| self.echo( | ||
| ( | ||
| "Connection to server lost. If this error persists, it may be a mismatch between the server and " | ||
| "client SSL configuration. To troubleshoot the issue, try --ssl-mode off or --ssl-mode on." |
There was a problem hiding this comment.
The message would be a little easier to parse visually with the option equal signs: --ssl-mode=off.
Description
In some edge cases like the cloud-sql-proxy, an SSL configuration mismatch (i.e. server not having SSL enabled, but client is forcing it) will result in a generic
(2013, 'Lost connection to MySQL server during query')error. This error unfortunately can mean many things, but to help the user diagnose a potential issue this PR adds an error message to check SSL configuration if the error persists.Resolves #1584 (with additional help from PR #1591)
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).