How to connect to Azure MySQL Database on local machine with private access

Winston Zhao 1 Reputation point
2021-12-03T22:16:10.31+00:00

Hi, I recently created an Azure MySQL Database with private access, because I need to connect to it remotely through a VPN without adding Firewall rules every time.

I'm stuck on how to connect to it on my local Windows computer for development purposes. I usually use DBeaver to manage databases. When I put the server name in the connection part on DBeaver and enter all the other credentials, it returns an error saying no such host is known. I am connected to the Azure VPN while doing this.

Am I supposed to use another way of connecting to the database, because of the private access?

Thanks!

Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
1,543 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
836 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msrini-MSFT 9,281 Reputation points Microsoft Employee
    2021-12-04T09:38:49.203+00:00

    @Winston Zhao ,

    I believe you are connecting to your MySQL using Private Endpoints. If so, try to add a host file entry in your laptop for your FQDN of SQL to the Private IP of the Private Endpoint of SQL and try to connect again. That should work.

    Regards,
    Karthik Srinivas

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.