Guidance on usage: MariaDB on Ubuntu Server 22.04 LTS Minimal

Connecting to MariaDB on Ubuntu Server 22.04 LTS Minimal by HeidiSQL through the SSH tunnel

  1. Before starting, the following components should be installed:
  1. To establish a connection with the server, you need to know the IP address of the virtual machine (VM). You can find it in your Azure personal account. Select the virtual machine from the list and click on the “Overview” item. Your IP address will be displayed under the “Public IP Address” line.
  1. Run HeidiSQL. In the lower-left corner, click on the <New> button to create a new session.
  1. In the “Network Type” field, select the “MariaDB or MySQL (SSH Tunnel)”
  1. Go to the “SSH tunnel” tab and select “plink.exe”
  1. In the “SSH host + port” field, enter the address of the virtual machine.
  1. In the “Username” and “Password” fields, type the data to connect to the virtual machine and click “Open”.
  1. Your MariaDB is ready.
  1. To manage the MariaDB server manually, you should connect to a VM. There are two methods you can use: OpenSSH or PuTTY.
  1. With OpenSSH

In the Windows 10 operating system (starting with version 1809), an OpenSSH client is available, with which you can connect to Linux servers via SSH. If Windows 10 is suitable and the OpenSSH client is installed, you can start connecting via SSH. To do this, launch a standard Windows command prompt and enter the command “ssh user@*vm_ip*” (1), where “user” is the username that was specified while creating the virtual machine and “*vm_ip*” is the VM IP address.

Then type “Yes” (2) and enter the password (3) that was specified while creating the virtual machine.

  1. With the PuTTY application 

Run Putty, enter the VM address in the “Host” field (1), and click “Open” (2) to connect.

In the opened console, enter the username (1) and password (2) that were specified while the VM was being created (you’ll not see the password in the console while entering it). 

  1. To check the server version, enter the following command:

$ mysql -V

  1. To manage the server, enter the command:

$ sudo mysql

More information – MariaDB Server Documentation