Create a managed MariaDB server in Azure, configure access, and connect from your SQL editor.
Azure provides a fully managed MariaDB service with automatic backups, built-in high availability, and scaling in minutes. Engineers avoid patching and focus on schema design and queries.
Use the Azure CLI az mariadb server create
command. Supply resource group, server name, admin credentials, compute tier, storage size, and version.Creation finishes in 2–3 minutes.
az mariadb server create \
--resource-group <rg> \
--name <server-name> \
--location <region> \
--admin-user <admin> \
--admin-password <password> \
--sku-name GP_Gen5_2 \
--storage-size 20 \
--version 10.5 \
--backup-retention 7
Create a firewall rule with az mariadb server firewall-rule create
or enable “Allow Azure services”.Always restrict by IP range in production.
Build a connection string: mariadb://admin:password@server-name.mariadb.database.azure.com:3306/ecommerce
. Use SSL parameters that Azure provides, then open the connection in your editor.
Run DDL for the typical ecommerce schema so teammates can query immediately.Atomic DDL keeps migration logs clean.
CREATE TABLE Customers (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(100),
email VARCHAR(120) UNIQUE,
created_at DATETIME DEFAULT NOW()
);
CREATE TABLE Orders (
id INT PRIMARY KEY AUTO_INCREMENT,
customer_id INT,
order_date DATE,
total_amount DECIMAL(10,2),
FOREIGN KEY (customer_id) REFERENCES Customers(id)
);
CREATE TABLE Products (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(120),
price DECIMAL(10,2),
stock INT
);
CREATE TABLE OrderItems (
id INT PRIMARY KEY AUTO_INCREMENT,
order_id INT,
product_id INT,
quantity INT,
FOREIGN KEY (order_id) REFERENCES Orders(id),
FOREIGN KEY (product_id) REFERENCES Products(id)
);
Insert seed rows, then run a JOIN query.If results return, networking, authentication, and schema are correct.
Enable SSL enforcement, set up geo-replication, and monitor metrics in Azure Monitor. Rotate admin passwords and use Azure AD authentication where possible.
Problem: Opening the server to the internet increases attack surface. Fix: Place the MariaDB server in a private VNet and access via Private Link.
Problem: Servers stop accepting writes when storage is full.Fix: Enable --storage-auto-grow
during creation or later with az mariadb server update
.
.
Yes. Microsoft handles patching, backups, and high availability so you focus on data and queries.
Most SKU changes trigger a short failover (usually <60 seconds). Schedule scaling during maintenance windows.
Currently Azure supports up to 10.5. Check the Azure roadmap for newer versions.