Skip to content

Commit 0eeb9c0

Browse files
authored
Update deploy.md
1 parent 136cb35 commit 0eeb9c0

1 file changed

Lines changed: 27 additions & 20 deletions

File tree

  • content/learning-paths/servers-and-cloud-computing/mysql-azure

content/learning-paths/servers-and-cloud-computing/mysql-azure/deploy.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ layout: learningpathall
88

99
## Install MySQL on Azure Cobalt 100
1010

11-
This section walks you through installing and securing MySQL on an Azure Arm64 virtual machine. You will set up the database, configure access, and verify it’s runningready for development and testing.
11+
This section demonstrates how to install and secure MySQL on an Azure Arm64 virtual machine. You will configure the database, set up security measures, and verify that the service is running properly, making the environment ready for development, testing, or production deployment.
1212

13-
Start by installing MySQL and other essential tools:
13+
## Install MySQL and Tools
1414

15-
## Install MySQL and tools
15+
Before installing MySQL, it’s important to ensure your VM is updated so you have the latest Arm64-optimized libraries and security patches. Ubuntu and other modern Linux distributions maintain Arm-native MySQL packages, so installation is straightforward with the system package manager.
1616

1717
1. Update the system and install MySQL
18-
You update your system's package lists to ensure you get the latest versions and then install the MySQL server using the package manager.
18+
Update your system's package lists to ensure you get the latest versions and then install the MySQL server using the package manager.
1919

2020
```console
2121
sudo apt update
@@ -24,32 +24,35 @@ sudo apt install -y mysql-server
2424

2525
2. Secure MySQL installation
2626

27-
After installing MySQL, You are locking down your database so only you can access it safely. It’s like setting up a password and cleaning up unused accounts to make sure no one else can mess with your data.
27+
Once MySQL is installed, the default configuration is functional but not secure.
28+
You will lock down your database so only you can access it safely. This involves setting up a password and cleaning up unused accounts to make sure no one else can access your data.
2829

2930
```console
3031
sudo mysql_secure_installation
3132
```
32-
Follow the prompts:
33+
This interactive script walks you through several critical security steps. Follow the prompts:
3334

3435
- Set a strong password for root.
3536
- Remove anonymous users.
3637
- Disallow remote root login.
3738
- Remove test databases.
3839
- Reload privilege tables.
3940

41+
After securing your MySQL installation, the database is significantly harder to compromise.
42+
4043
3. Start and enable MySQL service
41-
You are turning on the database so it starts working and making sure it stays on every time you turn on your computer.:
44+
After installation and securing MySQL, the next step is to ensure that the MySQL server process (mysqld) is running and configured to start automatically whenever your VM boots.
4245

4346
```console
4447
sudo systemctl start mysql
4548
sudo systemctl enable mysql
4649
```
47-
Check the status:
50+
Verify MySQL Status:
4851

4952
```console
5053
sudo systemctl status mysql
5154
```
52-
The output should look like:
55+
You should see output similar to:
5356

5457
```output
5558
mysql.service - MySQL Community Server
@@ -63,11 +66,11 @@ mysql.service - MySQL Community Server
6366
CGroup: /system.slice/mysql.service
6467
└─3255 /usr/sbin/mysqld
6568
```
66-
You should see `active (running)`.
69+
You should see `active (running)` in the output, which indicates that MySQL is up and running.
6770

6871
4. Verify MySQL version
6972

70-
You check the installed version of MySQL to confirm it’s set up correctly and is running.
73+
You check also check the installed version of MySQL to confirm it’s set up correctly and is running.
7174

7275
```console
7376
mysql -V
@@ -79,12 +82,12 @@ mysql Ver 8.0.43-0ubuntu0.24.04.1 for Linux on aarch64 ((Ubuntu))
7982
```
8083
5. Access MySQL shell
8184

82-
You log in to the MySQL interface using the root user to interact with the database and perform administrative tasks:
85+
After confirming that MySQL is running, the next step is to log in to the MySQL monitor (shell). This is the command-line interface used to interact with the database server for administrative tasks such as creating users, managing databases, and tuning configurations.
8386

8487
```
8588
sudo mysql
8689
```
87-
You should see output similar to the following:
90+
You should see output similar to:
8891

8992
```output
9093
Welcome to the MySQL monitor. Commands end with ; or \g.
@@ -101,16 +104,18 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
101104
102105
mysql>
103106
```
107+
The `mysql> prompt` indicates you are now in the MySQL interactive shell and can issue SQL commands.
104108

105109
6. Create a new user
106110

107-
You are setting up a new area to store your data and giving someone special permissions to use it. This helps you organize your work better and control who can access it:
111+
While the root account gives you full control, it’s best practice to avoid using it for day-to-day database operations. Instead, you should create separate users with specific privileges.
112+
Start by entering the MySQL shell:
108113

109114
```console
110115
sudo mysql
111116
```
112117

113-
Inside the MySQL shell, run:
118+
Inside the shell, create a new user:
114119

115120
```sql
116121
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'MyStrongPassword!';
@@ -119,19 +124,21 @@ FLUSH PRIVILEGES;
119124
EXIT;
120125
```
121126

122-
- Replace **MyStrongPassword!** with the password you want.
123-
- This reloads the privilege tables so your new password takes effect immediately.
127+
Replace `MyStrongPassword!` with a strong password of your choice.
128+
`FLUSH PRIVILEGES;` Reloads the in-memory privilege tables from disk, applying changes immediately.
124129

125130
## Verify Access with New User
126131

127-
You test logging into MySQL using the new user account to ensure it works and has the proper permissions. In my case new user is `admin`.
132+
Once you’ve created a new MySQL user, it’s critical to test login and confirm that the account works as expected. This ensures the account is properly configured and can authenticate against the MySQL server.
133+
134+
Run the following command ( for user `admin`):
128135

129136
```console
130137
mysql -u admin -p
131138
```
132-
- Enter your current `admin` password.
139+
You will then be asked to enter the password you created in the previous step.
133140

134-
You should see output similar to the following:
141+
You should see output similar to:
135142

136143
```output
137144
Enter password:

0 commit comments

Comments
 (0)