Connecting to MariaDB Server on Ubuntu 20.04 by HeidiSQL through the SSH tunnel
- Before starting, the following components should be installed:
- For the connection to the server, you should know the IP address of the VM. You can find it in the personal account of Azure. Select the virtual machine from the list. By clicking the item “Overview”, your IP is displayed in the line of “Public IP Address”.
- Run HeidiSQL. In the lower-left corner, click on the <New> button to create a new session
- In the “Network Type” field, select the “MariaDB or MySQL (SSH Tunnel)”
- Go to the “SSH tunnel” tab and select “plink.exe”
- In the “SSH host + port” field, enter the address of the virtual machine
- In the “Username” and “Password” fields, type the data to connect to the virtual machine and click “Open”
- Your MariaDB is ready
- To manage with the MariaDB server manually, you should connect to a VM.
- 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 normal 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 a password (3) that was specified while creating the virtual machine.
- 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, you will need to enter a 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).
- To check the server version enter
$ mysql -V
- To manage the server, enter the command:
$ sudo mysql
More information – MariaDB Server Documentation