1

I have a Linux Virtual Machine (Debian 9) deployed in Azure with Service Endpoints for Sql enabled and properly added -if I navigate the portal towards the VNet and enter the Service Endpoints tab, I can clearly see the Sql Service Endpoint listed. Just FYI, the reason for the Service Endpoint is that the VM has a dynamic IP, so I can't just whitelist it in the DB resource's configuration.

On the other hand, I have an 'Azure Database for MySQL server' deployed in the same resource group, same location and whatnot, but I can't seem to connect to it.

The steps I take when I try to connect are as follow:

  • I connect to the VM through SSH.
  • In my VM I have mysql-server installed
  • I write mysql --host <fully qualified server name> --user <server admin login name>@<server name> -p
  • I get the following error: "ERROR 9002 (28000): Server is not ready for incoming connections."

I've been reading the documentation and searching in forums for a reason why this might be happening, but I simply cannot seem to make it work. I have tried changing the status of the "Allow access to Azure services" option in the Connection security tab of the DB resource, but it doesn't seem to matter.

Could anyone have any idea of how I might go about solving this??

4

1 回答 1

3

您说您在虚拟网络上启用了 SQL 端点,但您是否向实例添加了 VNET 规则(附加现有 VNET)?您可以在Azure Database for MySQL 服务器 -> Connection Security -> VNET Rules -> Attach existing VNET中找到它。

如果看不到列出的 VNET,则说明 SQL 服务器和 VNET 的区域不匹配:它们必须部署到同一个区域。另外检查您是否拥有通用或内存优化服务器,此功能在基本层中不可用。

如果所有这些都到位,请尝试在 SQL Server 上启用诊断,尝试再次登录几次,然后查看日志文件并发布任何奇怪的内容。

于 2019-10-24T18:13:42.197 回答