Provision An Azure Database for MySQL Database

In this IT Pro Challenge virtual lab, you will get hands-on experience using Microsoft Azure to provision, configure, and use an Azure database for MySQL server. This lesson simulates a cloud migration strategy that you might implement for moving web apps to the cloud. These skills are essential for an Azure administrator, architect, or engineer.

45 minutes
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *

Already have an account? Sign In »


Lab Overview:

This hands-on lab provides an Azure administrator with an understanding of how to implement Microsoft Azure’s database for MySQL server. You will gain the exposure required to understand how an on-premise web app with MySQL database dependencies can be migrated to a serverless application cloud environment. As part of this lesson, you’ll also learn how to use the Azure Cloud Shell to manage your MySQL database. These skills are essential for someone pursuing a career path as an Azure administrator, architect, or engineer.

Understand the scenario

You are a system administrator for a company that is migrating its primary web app from their on-premise data center to Microsoft’s Azure cloud. You need to configure a MySQL database in Azure that will be used by a serverless web application. First, you will create an Azure Database for MySQL server, and then you will define the database and populate it with sample data. Finally, you will test the database using a test page provided within the web app.

Create an Azure Database for MySQL server:

Microsoft’s Azure Database for MySQL is a relational database service that uses the MySQL Community Edition database engine. Since it is a fully managed service, you don’t have to worry about infrastructure, maintenance, updates, backups, or infrastructure security. This capability drastically reduces the overhead associated with managing databases. In this section, you will provision a MySQL database, assign credentials, and enable the Azure services to access the database.

Provision a storage account and open a Cloud Shell session:

Azure Cloud Shell is an interactive, authenticated, browser-accessible shell for managing Azure resources. It is accessed directly through the Azure Portal. You can choose between Bash or PowerShell, based on your shell experience and preference. A Cloud Shell requires access to a Storage Account to operate. You will provision a storage account, then configure a file share for Cloud Shell on your storage account, and then launch a Bash Cloud Shell using those resources.

Create and populate a MySQL database:

For this task, you will use common MySQL commands to create and populate a dummy database. You will become familiar with the MySQL commands: CREATE DATABASE, USE, CREATE TABLE, and INSERT INTO. You are provided hints along the way, so don’t worry if your MySQL skills are less than polished.

Test the connection to the database from the web application:

To enable your web application to connect to the database, you need to provide a specifically formatted connection string. You will become familiar with locating this information within the Azure portal, then using that information to test your web app’s access to the database. For this lesson, you are provided a web application with a test page that will confirm the configuration is correct.

Lab Summary Conclusion:

In this hands-on virtual lab, you will learn how to provision, configure, and populate an Azure database for MySQL server. Once the database is set up, you will test accessibility by a web application. This lesson is meant to simulate a migration of your web application from an on-premise data center to Microsoft’s Azure cloud platform. These are essential skills for someone pursuing a career path as an Azure administrator, architect, or engineer.

Other Challenges in this series

  • Guided Challenge - Configuring Blob Storage with Public Access
  • Advanced Challenge - Can you Provision Relational Databases for a Web App?