-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Connecting to Azure Database for MySQL fails #1729
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
Comments
What should it do instead? Is there any documentation you can point to showing the wire protocol that Azure is using? You can also put together a PR if there is nothing you can point me to. |
Oracle literally just deleted all the protocol documentation (https://dev.mysql.com/doc/internals/en/client-server-protocol.html) so we have to use archived docs. As discussed in Authentication Method Mismatch, an Authentication Method Switch Request packet can be sent by the server during initial handshaking. mysqljs assumes that this always means dropping down to I'm trying to put together a PR now; I'm familiar with the MySQL protocol but don't know the mysqljs library that well. I've also posted on the MSDN forums requesting that Azure MySQL support fast path authentication (which would prevent this from the server side). |
Oh, gotcha, this is an auth plugin switch request. Yes, this library does not support that part of the protocol currently. I believe that makes this issue a duplicate of #1396 |
I'm having exactly the same issue while setting up Ghost with Azure's Mysql Database. Is there a known workaround yet? |
@dbalaouras I authored a workaround in e3e123e (but it hasn't been merged in yet). I suppose you might be able to cherry-pick that fix to a local copy of the code (and/or use
Other than that, based on what I know about Azure MySQL and mysqljs, I can't think of an easy workaround. |
@bgrainger many thanks for the followup. I need to use the original version of Ghost, hence I cannot modify it's codebase. I guess I have to wait for your patch to get pulled, or Azure to support fast path authentication..in the meanwhile I'm dropping Azure Mysql. |
Create an Azure Database for MySQL 5.7 instance and attempt to connect to it. The following exception is thrown:
I believe this is the same problem as mysql-net/MySqlConnector#259 with a spurious error message due to Handshake.js assuming all packets starting with 0xFE are requesting old auth.
The text was updated successfully, but these errors were encountered: