检测Azure MySQL代理 [英] Detect the Azure MySQL proxy

查看:152
本文介绍了检测Azure MySQL代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个ADO.NET MySQL连接器库:  https://github.com/mysql-net/ MySqlConnector


出于诊断和功能检测的原因,我想知道我是否已通过Azure数据库连接MySQL代理,因此我可以获得"真实"信息。服务器的详细信息:  https://github.com /mysql-net/MySqlConnector/blob/5b5c1fd23f244f2fd8793f386c57eb38edd1c97e/src/MySqlConnector/Core/ServerSession.cs#L1132-L1133


我之前报道的一个 https://social.msdn.microsoft。 com /论坛/ en-US / 795cb2be-dce7-4805-b324-a67e83697580 / azure-database-for-mysql-reports-incorrect-version?forum = AzureDatabaseforMySQL
Azure代理返回" ; 5.6.26.0"作为它的版本。从那时起,它似乎已经升级到"5.6.39.0"。 (服务器握手中的当前版本)。


我可以依赖于确定发出握手的服务器是否有任何明确的测试,而不是我的硬编码列表。 Azure代理?


相反,这篇文章可以被视为功能请求:您是否可以更改初始握手数据包中的服务器版本字符串  https://dev.mysql.com/doc/internals/en/connection-phase-packets.html# packet-Protocol :: HandshakeV10  到
包括一些特定于Azure的标识符,例如,将版本更改为"5.6.39.0-Azure"?

解决方案

Bradley,


可以在Azure数据库中为MySQL提供功能请求和相关产品反馈

Uservoice
。 


至于发布信息,请参阅:  支持的MySQL数据库MySQL服务器版本 详细说明如何获取特定实例的正确版本信息
以及发行说明。


如果您有其他问题,请告知我们。


问候,


Mike


I author an ADO.NET MySQL connector library: https://github.com/mysql-net/MySqlConnector

For diagnostic and feature detection reasons, I want to know if I've connected through an Azure Database for MySQL proxy so I can get the "real" server's details: https://github.com/mysql-net/MySqlConnector/blob/5b5c1fd23f244f2fd8793f386c57eb38edd1c97e/src/MySqlConnector/Core/ServerSession.cs#L1132-L1133

As I previously reported in https://social.msdn.microsoft.com/Forums/en-US/795cb2be-dce7-4805-b324-a67e83697580/azure-database-for-mysql-reports-incorrect-version?forum=AzureDatabaseforMySQL, the Azure Proxy was returning "5.6.26.0" as its version. Since then, it appears to have been upgraded to "5.6.39.0" (the current version in the server handshake).

Rather than my hardcoding a list of potential versions, is there any unambiguous test I could rely on to determine whether the server that issued the handshake is an Azure proxy?

Conversely, this post could be considered a feature request: could you change the server version string in the Initial Handshake packet https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeV10 to include some Azure-specific identifier, e.g., change the version to "5.6.39.0-Azure"?

解决方案

Bradley,

Feature requests and related product feedback can be provided in the Azure Database for MySQL Uservoice

As for release information, please see: Supported Azure Database for MySQL server versions as it details how to get the correct version information for your specific instance, along with release notes.

Please let us know if you have additional questions.

Regards,

Mike


这篇关于检测Azure MySQL代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆