Today, I set up a database on Azure. Previously, I always worked with local databases like MySQL, MariaDB, and MS SQL. I used various clients, both CLI and GUI, such as MySQL Workbench. However, when designing for the cloud, there are many more options to consider.
For the first time, I opted for the graphical interface of the Azure Portal.
- Let's navigate to the Azure SQL page. I don't have any databases yet, so I'll click Create New.
- Now we need to choose the type of resource we want to create. I chose "SQL database / Single database." The other options, "SQL managed instance," and "SQL virtual machines" seem more advanced. I'll explore those later to understand their implications.
- Next, we're in the "Basics" section. First, we select a subscription, which will be billed for the database.
- Then, we assign a resource group—a folder where all the new resources will be placed. I created a new one.
- For the "Database name" we should give our database a unique name. The server will need a unique name too, but I'll cover that later.
- Now we need to set up the server. A SQL server can serve multiple databases. If we already have one, we can use it. We can also connect additional databases to the new server later. For the server, I chose an SQL authentication method. I'm using SQL authentication—it's a simple username/password setup. It's important to remember these credentials and write them down somewhere secure.
- When asked if I want to use an SQL elastic pool, I answered "No." This is related to self-managing database resources. I'll need to learn more about this.
- The "Workload environment" encompasses backup and compute settings. I selected "Development"—it's cost-effective but less secure.
- Next, we move to the "Networking" section.
- Here, we choose the "Connectivity method"—a "Public endpoint."
- For the "Connection policy," I switched "Add current client IP address" to "Yes."
- I didn't make any changes in the "Security" section, as I'm not familiar with the terms and technologies.
- In the "Additional settings" section, you can create a sample database. I went ahead and did that.
Now, the database is configured. I clicked "Review + Create" and then "Create."
Azure provisions an SQL Server and sets up the database.
For access, I tried the Query Editor in the Azure Portal and Azure Data Studio on my local laptop.
Everything worked as expected. The schema is readable, and all queries returned data.
Top comments (0)