Use MySQL Flexible Server as data source for AI Search Service indexer

108 views Asked by At

I'm using a MySQL Flexible Server as data source for an Indexer in my AI Search Service. Everything worked smoothly when all the resources were public but I'm having trouble getting it to work in a private environment. The DB is in a protected Vnet. The search service is also private and has a private endpoint to it from the same Vnet as the DB.

Based on the documentation here, my only option to allow a connection between these 2 resources is to create a shared private link. However, when I try to create this link, MySQL Flexible Server is not listed in the supported options. enter image description here

What are my options to make this work? Or is it simply not possible with how the environment is set up currently?

1

There are 1 answers

0
Naveen Sharma On

The solution is to Create a MySQL Flexible Server with a private endpoint and create a vm with the same VNet and Subnet

Once create a VM login to the VM and try to access the MySQL Flexible Server from that VM.
Make sure that both the MySQL Flexible Server and the AI Search Service are within the same Azure Virtual Network (VNet). This allows them to communicate securely without exposing their endpoints to the public internet.

you’ll first need to create a MySQL Flexible Server with a private endpoint and ensure that both the MySQL server and the virtual machine (VM) are within the same Virtual Network (VNet) and subnet…

Create a Virtual Network (VNet):

  • Navigate to the Azure portal.
  • Go to “Create a resource” > “Networking” > “Virtual network”.
  • Specify the required details like name, address space, and subnet configuration. Ensure that the subnet you create is large enough to accommodate both the MySQL Flexible Server and the VM.

enter image description here

Create a MySQL Flexible Server with Private Endpoint:

  • Navigate to the Azure portal.
  • Go to “Create a resource” > “Databases” > “Azure Database for MySQL”.
  • Fill in the necessary details for creating the MySQL Flexible Server.
  • During the configuration, enable the option to create a private endpoint and associate it with the subnet you created in step 1.
    enter image description here

Create a Virtual Machine (VM):

  • Navigate to the Azure portal.
  • Go to “Create a resource” > “Compute” > “Virtual machine”.
  • Configure the VM with the required specifications (size, OS, etc.).
  • During the configuration, ensure that you select the same VNet and subnet as the MySQL Flexible Server.
    enter image description here

configure the private endpoint properly to allow access from the subnet where the AI Search Service resides.