An Azure relational database service.
Hi PROFESOR MADYA TS. DR. NURUL AKMAR BINTI EMRAN,
Thanks for your question — hosting a website with a database in Azure is definitely a common scenario, and you’re on the right track.
A simple and recommended approach is to use Azure’s fully managed services:
- Azure App Service to host your web application
- A managed database like Azure SQL Database, Azure Database for MySQL – Flexible Server, or Azure Database for PostgreSQL – Flexible Server
These services are fully managed, meaning Microsoft takes care of patching, backups, and high availability, so you can focus on your application.
At a high level, you can follow these steps:
- Create a Resource Group
- Create an App Service Plan and Web App
- Create your database server (SQL / MySQL / PostgreSQL)
- Configure network access (firewall rules or private endpoint)
- Add the connection configuration in your Web App
- Deploy your application using your preferred method (Visual Studio, GitHub, etc.)
Important note about MariaDB
If you were considering Azure Database for MariaDB, please note that this service is being retired on September 19, 2025, and new MariaDB instances are no longer supported
Microsoft recommends migrating to Azure Database for MySQL – Flexible Server, which offers better performance, improved architecture, and more flexibility.
So for new deployments, it’s best to choose MySQL Flexible Server or PostgreSQL Flexible Server instead.
- Use Managed Identity where possible to avoid storing credentials
- Restrict database access using firewall rules or private networking
- Keep your App Service and database in the same region
- Start with smaller pricing tiers and scale as needed
Using Azure App Service + a managed database (SQL / MySQL / PostgreSQL) is the most straightforward and production-ready way to host a web app with a database in Azure.
Microsoft References Link:
- Deploy ASP.NET app with Azure SQL Database
- Connect App Service to Azure databases using Managed Identity
- What’s happening to Azure Database for MariaDB
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.