Creating a MySQL database as part of Microsoft Azure for students
- Tutorial

In this article, I would like to supplement this series and describe how you can connect a MySQL database to a project on the .NET Framework. Since this process combines several entities (Azure, MySQL, and Visual Studio), it will be described as detailed as possible in pictures for beginner programmers.
Therefore, carefully traffic!
So, in order to achieve the desired goal - we need to perform a number of simple actions:

Next, you need to set a number of simple settings:

Price category (20MB available):

Each Azure resource must be in a resource group. If you don’t have such groups yet, create it:

In our case, just give her a name unique to our account:

Geographical location - closest to us is Northern Europe: We will

familiarize ourselves with the “terms of use” and “privacy statement”:

Excellent , we have entered all the necessary settings and we can create our database:

The creation process takes some time, and while the database is expanding, we see an animated icon:

Also, in the section of operations that are being performed, we see similar information:

After the database is created, we will see a notification:

Using the tile on the main page , we’ll go to properties Databases:

And let's move on to the full list of parameters:

We are interested in “Host Name”, “Port”, “Username” and “Password”. We will need them to access the database.


Click the desired link:

We get to the official download site. Scroll down:

Choose the bit depth of your operating system:

In my case, this is Windows 10 x64:

We will be kindly invited to join the community, but this is not necessary. We can immediately proceed to the download:

The download starts:

We start the installer:

Click Next-Next, ticking along the lines:

When the installation is complete, start MySQL Workbench:

Since we will have to connect to MySQL more than once, create a connection template:

Create a new template:

Go to connection parameters:

Now enter the data we saw on the Azure Management Console. And in order not to enter a password every time we connect, save it in the Workbench password store:

Enter the password:

Now we can check if we entered everything correctly:

Great! Connection is established:

Now, when starting Workbench, we can connect to the database in one click:

Wait a bit:

The classic database management environment will open. Let's move on to our database:

As you can see, the database is empty. You can create your first table using the SQL CREATE TABLE query in the Query window:


Click on the desired link:

Scroll down:

Choose the bitness of our operating system:

Go directly to the download: Download

starts:

Run the installer:

Click "Next, Next", by ticking along the way:


Create the simplest Web project:

In my case, it will be an empty ASP.NET solution:

Now we will go to the “Server Browser” to establish a connection:

We

’ll see our subscription: Click on the “Connect to database” icon:

As you can see , now MySQL is available in the list of available providers:

Enter our credentials from the Azure management console and check availability:


Now from the drop-down list we see our database:

Establish a connection:

Great! Finally, we have full access to our MySQL database hosted in the Azure cloud from Visual Studio!

As you can see, the whole procedure is quite simple and transparent. I hope this article will be useful for beginners who are interested in web development or are planning to create their first backend for a mobile application.
Good coding and interesting projects!
UPD: Added spoilers, I hope so the abundance of images will cause less discomfort when scrolling.