webapp1 という名前の Azure Web アプリがあります。 VNET1という名前の仮想ネットワークと、MySQLデータベースをホストするVM1という名前のAzure仮想マシンがあります。VM1はVNET1に接続します。 webapp1がVM1上でホストされているデータにアクセスできることを確認する必要があります。 あなたはどうすべきですか?
正解:D
Connect an App Services Web app to Azure Database for MySQL - Flexible Server in a virtual network Add the web app to the virtual network Use az webapp vnet-integration command to add a regional virtual network integration to a webapp. Replace <vnet-name> and <subnet-name with the virtual network and subnet name that the Azure Database for MySQL Flexible Server instance is using. az webapp vnet-integration add -g myresourcegroup -n mywebapp --vnet VNETName --subnet webappsubnetName Configure environment variables to connect the database With the code now deployed to App Service, the next step is to connect the app to the Azure Database for MySQL Flexible Server instance in Azure. The app code expects to find database information in a number of environment variables. To set environment variables in App Service, you create "app settings" with the az webapp config appsettings set command. az webapp config appsettings set --settings DBHOST="<mysql-server- name>.mysql.database.azure.com" DBNAME="flexibleserverdb" DBUSER="<username>" DBPASS="<password> Reference: https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-webapp-server-vnet