dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.42k stars 661 forks source link

Check error code, not message for OperationalError #964

Closed gfrlv closed 3 years ago

gfrlv commented 3 years ago

Description

We check for ACCESS_DENIED by looking at the error message of the OperationalError, but it can be translated to other languages https://dev.mysql.com/doc/refman/8.0/en/error-message-language.html. It's safer to use the error code.

Checklist

j-bennet commented 3 years ago

Nice one. Has to be rebased on master.