Skip to content

Commit 04ed251

Browse files
committed
Deploy MySQL on the Microsoft Azure Cobalt 100 processors
Signed-off-by: odidev <[email protected]>
1 parent 2e43b25 commit 04ed251

File tree

13 files changed

+654
-0
lines changed

13 files changed

+654
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Run MySQL on Microsoft Azure Cobalt 100 processors
3+
4+
minutes_to_complete: 40
5+
6+
who_is_this_for: This is an advanced topic that introduces MySQL deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machines. It is designed for developers migrating MySQL applications from x86_64 to Arm.
7+
8+
learning_objectives:
9+
- Provision an Azure Arm64 virtual machine using Azure console
10+
- Learn how to create an Azure Linux 3.0 Docker container
11+
- Deploy a MySQL database inside an Azure Linux 3.0 Arm64-based Docker container or an Azure Linux 3.0 custom-image based Azure virtual machine
12+
- Run MySQL mysqlslap benchmarks to understand and evaluate performance on the Azure Cobalt 100 virtual machine
13+
14+
prerequisites:
15+
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6)
16+
- A machine with [Docker](/install-guides/docker/) installed
17+
- Familiarity with relational databases and the basics of [MySQL](https://dev.mysql.com/doc/refman/8.0/en/introduction.html)
18+
19+
author: Pareena Verma
20+
21+
### Tags
22+
skilllevels: Advanced
23+
subjects: Databases
24+
cloud_service_providers: Microsoft Azure
25+
26+
armips:
27+
- Neoverse
28+
29+
tools_software_languages:
30+
- MySQL
31+
- mysqlslap
32+
- Docker
33+
34+
operatingsystems:
35+
- Linux
36+
37+
further_reading:
38+
- resource:
39+
title: Azure Virtual Machines documentation
40+
link: https://learn.microsoft.com/en-us/azure/virtual-machines/
41+
type: documentation
42+
- resource:
43+
title: Azure Container Instances documentation
44+
link: https://learn.microsoft.com/en-us/azure/container-instances/
45+
type: documentation
46+
- resource:
47+
title: Docker overview
48+
link: https://docs.docker.com/get-started/overview/
49+
type: documentation
50+
- resource:
51+
title: MySQL Manual
52+
link: https://dev.mysql.com/doc/refman/8.0/en/installing.html
53+
type: documentation
54+
- resource:
55+
title: mysqlslap official website
56+
link: https://dev.mysql.com/doc/refman/8.4/en/mysqlslap.html
57+
type: website
58+
59+
### FIXED, DO NOT MODIFY
60+
# ================================================================================
61+
weight: 1 # _index.md always has weight of 1 to order correctly
62+
layout: "learningpathall" # All files under learning paths have this same wrapper
63+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
64+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Getting started with Microsoft Azure Cobalt 100, Azure Linux 3.0, and MySQL
3+
weight: 2
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: "learningpathall"
7+
---
8+
9+
## Key technologies for running MySQL on Azure Cobalt 100
10+
11+
This section introduces the key technologies you will use when running MySQL database on Microsoft Azure Cobalt 100 processors. You will learn about the Azure Cobalt 100 Arm-based processor, Azure Linux 3.0, and MySQL.
12+
13+
## Azure Cobalt 100 processor
14+
15+
Azure Cobalt 100 is Microsoft’s first-generation Arm-based processor, designed for cloud-native, scale-out Linux workloads. Based on Arm’s Neoverse-N2 architecture, this 64-bit CPU delivers improved performance and energy efficiency. Running at 3.4 GHz, it provides a dedicated physical core for each vCPU, ensuring consistent and predictable performance.
16+
17+
Typical workloads include web and application servers, data analytics, open-source databases, and caching systems.
18+
19+
To learn more, see the Microsoft blog [Announcing the preview of new Azure virtual machines based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).
20+
21+
## Azure Linux 3.0
22+
23+
Azure Linux 3.0 is Microsoft’s lightweight Linux distribution optimized for cloud-native workloads on Azure. It is designed for performance, security, and reliability. Azure Linux 3.0 is tailored for containers, microservices, and Kubernetes.
24+
25+
With native support for Arm64 (AArch64) architecture, Azure Linux 3.0 enables efficient execution of workloads on Arm-based infrastructure, making it a scalable and cost-effective choice for cloud deployments.
26+
27+
## MySQL
28+
29+
MySQL is an open-source relational database management system (RDBMS) widely used for storing, organizing, and managing structured data. It uses SQL (Structured Query Language) for querying and managing databases, making it one of the most popular choices for web applications, enterprise solutions, and cloud deployments.
30+
31+
It is known for its reliability, high performance, and ease of use. MySQL supports features like transactions, replication, partitioning, and robust security, making it suitable for both small applications and large-scale production systems.
32+
33+
Learn more at the [MySQL official website](https://www.mysql.com/) and in the [official documentation](https://dev.mysql.com/doc/)
34+
.
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
---
2+
title: Validate MySQL on Azure Cobalt 100 Arm64 VMs
3+
weight: 6
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Run a functional test of MySQL on Azure Cobalt 100
10+
11+
After installing MySQL on your Arm64 virtual machine, you can perform simple baseline testing to validate that MySQL runs correctly and produces the expected output.
12+
13+
### Start MySQL
14+
15+
Make sure MySQL is running:
16+
17+
```console
18+
sudo /usr/local/mysql/bin/mysqld_safe --datadir=/usr/local/mysql/data &
19+
```
20+
Starts the MySQL server in safe mode using **/usr/local/mysql/data** as the data directory, running in the background.
21+
22+
### Connect to MySQL
23+
24+
```console
25+
mysql -u root -p
26+
```
27+
Opens the MySQL client and connects as the root user, prompting you to enter the root password.
28+
29+
### Create, show and use Database
30+
31+
```sql
32+
CREATE DATABASE baseline_test;
33+
SHOW DATABASES;
34+
USE baseline_test;
35+
SELECT DATABASE();
36+
```
37+
- `CREATE DATABASE baseline_test;` - Creates a new database named baseline_test.
38+
- `SHOW DATABASES;` - Lists all available databases.
39+
- `USE baseline_test;` - Switches to the new database.
40+
- `SELECT DATABASE();` - Confirms the current database in use.
41+
42+
You should see output similar to:
43+
44+
```output
45+
mysql> CREATE DATABASE baseline_test;
46+
Query OK, 1 row affected (0.02 sec)
47+
48+
mysql> SHOW DATABASES;
49+
+--------------------+
50+
| Database |
51+
+--------------------+
52+
| baseline_test |
53+
| information_schema |
54+
| mysql |
55+
| performance_schema |
56+
| sys |
57+
+--------------------+
58+
5 rows in set (0.00 sec)
59+
60+
mysql> SELECT DATABASE();
61+
+---------------+
62+
| DATABASE() |
63+
+---------------+
64+
| baseline_test |
65+
+---------------+
66+
1 row in set (0.00 sec)
67+
```
68+
You created a new database named **baseline_test**, verified its presence with `SHOW DATABASES`, and confirmed it is the active database using `SELECT DATABASE()`.
69+
70+
### Create and show Table
71+
72+
```sql
73+
CREATE TABLE test_table (
74+
id INT AUTO_INCREMENT PRIMARY KEY,
75+
name VARCHAR(50),
76+
value INT
77+
);
78+
```
79+
80+
- `CREATE TABLE` - Defines a new table named test_table.
81+
- `id` - Primary key with auto-increment.
82+
- `name` - String field up to 50 characters.
83+
- `value` - Integer field.
84+
- `SHOW TABLES;` - Lists all tables in the current database.
85+
86+
You should see output similar to:
87+
88+
```output
89+
Query OK, 0 rows affected (0.05 sec)
90+
91+
mysql> SHOW TABLES;
92+
+-------------------------+
93+
| Tables_in_baseline_test |
94+
+-------------------------+
95+
| test_table |
96+
+-------------------------+
97+
1 row in set (0.00 sec)
98+
```
99+
You successfully created the table **test_table** in the `baseline_test` database and verified its existence using `SHOW TABLES`.
100+
101+
### Insert Sample Data
102+
103+
```sql
104+
INSERT INTO test_table (name, value)
105+
VALUES
106+
('Alice', 100),
107+
('Bob', 200),
108+
('Charlie', 300);
109+
```
110+
- `INSERT INTO test_table (name, value)` - Specifies which table and columns to insert into.
111+
- `VALUES` - Provides three rows of data.
112+
113+
After inserting, you can check the data with:
114+
115+
```sql
116+
SELECT * FROM test_table;
117+
```
118+
- `SELECT *` - Retrieves all columns.
119+
- `FROM test_table` - Selects from the test_table.
120+
121+
You should see output similar to:
122+
123+
```output
124+
mysql> SELECT * FROM test_table;
125+
+----+---------+-------+
126+
| id | name | value |
127+
+----+---------+-------+
128+
| 1 | Alice | 100 |
129+
| 2 | Bob | 200 |
130+
| 3 | Charlie | 300 |
131+
+----+---------+-------+
132+
3 rows in set (0.00 sec)
133+
```
134+
135+
The functional test was successful — the **test_table** contains three rows (**Alice, Bob, and Charlie**) with their respective values, confirming MySQL is working
136+
correctly.
137+

0 commit comments

Comments
 (0)